summary refs log tree commit diff
path: root/test/_fix3.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/_fix3.ssa
parentaad52241c88ad5327a8488c66dc906c8393c9c92 (diff)
downloadroux-36635660b40573f6a0c19d50dfdd9277589030de.tar.gz
extract tests out of src
Diffstat (limited to 'test/_fix3.ssa')
-rw-r--r--test/_fix3.ssa20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/_fix3.ssa b/test/_fix3.ssa
new file mode 100644
index 0000000..283e5a1
--- /dev/null
+++ b/test/_fix3.ssa
@@ -0,0 +1,20 @@
+function w $test() {
+@start
+	%x =w copy 100
+	%s =w copy 0
+@l
+	%c =w cslew %x, 10
+	jnz %c, @a, @b
+@a
+	%s =w add %s, %x
+	%x =w sub %x, 1
+	jmp @c
+@b
+	%s =w sub %s, %x
+	jmp @c
+@c
+	%x =w sub %x, 1
+	jnz %x, @l, @end
+@end
+	ret %s
+}