summary refs log tree commit diff
path: root/lisc/test
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-07-25 06:39:38 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:29 -0400
commit48f90356e0ab48307d34a21f918701e671d6d37e (patch)
tree3cb9c975e6a78877f3dc2c766bbba9fa1bd1a4bd /lisc/test
parent5bd9deac8df0c3f097b5ffbb5381af4003fe667c (diff)
downloadroux-48f90356e0ab48307d34a21f918701e671d6d37e.tar.gz
new euclidean division test
Diffstat (limited to 'lisc/test')
-rw-r--r--lisc/test/eucl.ssa15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisc/test/eucl.ssa b/lisc/test/eucl.ssa
new file mode 100644
index 0000000..71725ea
--- /dev/null
+++ b/lisc/test/eucl.ssa
@@ -0,0 +1,15 @@
+# euclide's algorithm in ssa
+# it is a fairly interesting
+# ssa program because of the
+# swap of b and a
+
+@start
+
+@loop
+	%a = phi @start 380, @loop %r
+	%b = phi @start 747, @loop %a
+	%r = rem %b, %a
+	jez %r, @end, @loop
+
+@end
+	ret