summary refs log tree commit diff
path: root/test/cup.ssa
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-27 15:00:45 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-27 15:00:45 -0400
commit36635660b40573f6a0c19d50dfdd9277589030de (patch)
treea1b4463f7260462c314bd8d7cb35b3d199143f33 /test/cup.ssa
parentaad52241c88ad5327a8488c66dc906c8393c9c92 (diff)
downloadroux-36635660b40573f6a0c19d50dfdd9277589030de.tar.gz
extract tests out of src
Diffstat (limited to 'test/cup.ssa')
-rw-r--r--test/cup.ssa17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/cup.ssa b/test/cup.ssa
new file mode 100644
index 0000000..013394f
--- /dev/null
+++ b/test/cup.ssa
@@ -0,0 +1,17 @@
+# counts up from -1988 to 1991
+
+function $test() {
+@start
+@loop
+	%n0  =l phi @start -1988, @loop %n1
+	%n1  =l add 1, %n0
+	%cmp =w cslel 1991, %n1
+	jnz %cmp, @end, @loop
+@end
+	ret
+}
+
+# >>> driver
+# extern void test(void);
+# int main() { test(); return 0; }
+# <<<