summary refs log tree commit diff
path: root/lisc/test
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-07-24 10:22:07 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:29 -0400
commit5ac9fbd8e4ca152c7fb62e2c77f1c9ccd1d0db02 (patch)
treec5c4ce18d1a5436298b01e137908f5cdc1096249 /lisc/test
parent36da4b30cc13f7b482171ac6fff716078dd53009 (diff)
downloadroux-5ac9fbd8e4ca152c7fb62e2c77f1c9ccd1d0db02.tar.gz
new spill test
Diffstat (limited to 'lisc/test')
-rw-r--r--lisc/test/spill.ssa12
-rw-r--r--lisc/test/spill1.ssa20
2 files changed, 27 insertions, 5 deletions
diff --git a/lisc/test/spill.ssa b/lisc/test/spill.ssa
index 9e24e9e..072a231 100644
--- a/lisc/test/spill.ssa
+++ b/lisc/test/spill.ssa
@@ -1,11 +1,13 @@
-# Test with NReg == 3
+# test with NReg == 3
 # there must be a spill
-# happening on %c.
-# If you replace the sub
+# happening on %c
+#
+# if you replace the sub
 # by an add or comment
 # the two marked lines
 # there should be no
-# spill.
+# spill
+#
 
 @start
 	%f = copy 0      # here
@@ -13,6 +15,6 @@
 	%c = copy 2
 	%a = sub %b, %c
 	%d = copy %b
-	%e = copy %f     # and here
+	%e = copy %f     # and there
 	%g = copy %a
 	ret
diff --git a/lisc/test/spill1.ssa b/lisc/test/spill1.ssa
new file mode 100644
index 0000000..5ebfd8c
--- /dev/null
+++ b/lisc/test/spill1.ssa
@@ -0,0 +1,20 @@
+# stupid spilling test
+
+@start
+	%x1  = copy 10
+	%x2  = add %x1, %x1
+	%x3  = sub %x2, %x1
+	%x4  = add %x3, %x1
+	%x5  = sub %x4, %x1
+	%x6  = add %x5, %x1
+	%x7  = sub %x6, %x1
+	%x8  = add %x7, %x1
+	%x9  = sub %x8, %x8
+	%x10 = add %x9, %x7
+	%x11 = sub %x10, %x6
+	%x12 = add %x11, %x5
+	%x13 = sub %x12, %x4
+	%x14 = add %x13, %x3
+	%x15 = sub %x14, %x2
+	%x16 = add %x15, %x1
+	ret