commit 18cdbc1e7d6b0d9dcb6f051cf3c2afcf45448453
parent 226bbb5b71174bf997c7ac91df73bcffa5b9c46d
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Tue, 21 Jul 2015 13:02:08 -0400
add fun example!
Diffstat:
1 file changed, 23 insertions(+), 0 deletions(-)
diff --git a/lisc/test/alt.ssa b/lisc/test/alt.ssa
@@ -0,0 +1,23 @@
+# an example with reducible control
+# flow graph that exposes poor
+# handling of looping constructs
+
+@start
+ %ten = copy 10
+@loop
+ %alt = phi @start 0, @left %alt1, @right %alt1
+ %cnt = phi @start 100, @left %cnt, @right %cnt2
+ %alt1 = sub 1, %alt
+ jez %alt1, @left, @right
+@left
+ %x = phi @loop 10, @left %x1
+ %x1 = sub %x, 1
+ jez %x, @loop, @left
+@right
+ %cnt1 = phi @loop %cnt, @right %cnt2
+ %cnt2 = sub %cnt1, %ten
+ jez %cnt2, @end, @loop
+@end
+ %ret = copy %cnt # a dummy use, no return
+ # values are available yet
+ ret