qbe

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

double.ssa (407B)


      1 export
      2 function $test() {
      3 @start
      4 	%x1 =d copy d_0.1
      5 	%x2 =d add d_0.2, %x1
      6 	%x3 =d sub %x2, d_0.3
      7 
      8 @loop
      9 	%x4 =d phi @start %x3, @loop %x5
     10 	%i1 =w phi @start 0, @loop %i2
     11 	%x5 =d add %x4, %x4
     12 	%i2 =w add %i1, 1
     13 	%c0 =w cled %x5, 4607182418800017408 # d_1.0
     14 	jnz %c0, @loop, @end
     15 
     16 @end
     17 	storew %i2, $a
     18 	ret
     19 }
     20 
     21 # >>> driver
     22 # extern void test(void);
     23 # int a;
     24 # int main() { test(); return !(a == 55); }
     25 # <<<