qbe

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

rega1.ssa (457B)


      1 # tests that %b and %a0 do not end up in
      2 # the same register at the start of @loop
      3 
      4 export function l $f(l %a) {
      5 @start
      6 @loop
      7 	%b =l phi @start 42, @loop0 %a1, @loop1 %a1
      8 	%a0 =l phi @start %a, @loop0 %a1, @loop1 %a1
      9 	%a1 =l sub %a0, 1
     10 	jnz %b, @loop0, @loop1
     11 @loop0
     12 	jnz %a1, @loop, @end
     13 @loop1
     14 	jnz %a1, @loop, @end
     15 @end
     16 	ret %b
     17 }
     18 
     19 # >>> driver
     20 # extern long long f(long long);
     21 # int main() {
     22 # 	return !(f(1) == 42 && f(2) == 1 && f(42) == 1);
     23 # }
     24 # <<<