From d3f1cd94833b33c2817312dfd67100693987083f Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Wed, 11 Nov 2015 21:21:17 -0500 Subject: add new ssa fixing example --- lisc/test/fix4.ssa | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lisc/test/fix4.ssa diff --git a/lisc/test/fix4.ssa b/lisc/test/fix4.ssa new file mode 100644 index 0000000..7ca8e2d --- /dev/null +++ b/lisc/test/fix4.ssa @@ -0,0 +1,28 @@ +function $test() { +@start + %x =w copy 3 + %n =w copy 2 +@loop + %c =w ceq %n, 10000 + %t =w copy 3 + jnz %c, @end, @next +@next + %t =w copy 3 + %x =w add %x, 2 +@tloop + %s =w mul %t, %t + %c =w csgt %s, %x + jnz %c, @prime, @test +@test + %r =w rem %x, %t + jnz %r, @tnext, @loop +@tnext + %t =w add %t, 2 + jmp @tloop +@prime + %n =w add %n, 1 + jmp @loop +@end + storew %x, $a + ret +} -- cgit 1.4.1