qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit d3f1cd94833b33c2817312dfd67100693987083f
parent 33a4b128a9486d9cebe33f8c3ae4a5ebca1d4046
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Wed, 11 Nov 2015 21:21:17 -0500

add new ssa fixing example

Diffstat:
Alisc/test/fix4.ssa | 28++++++++++++++++++++++++++++
1 file changed, 28 insertions(+), 0 deletions(-)

diff --git a/lisc/test/fix4.ssa 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 +}