qbe

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

philv.ssa (566B)


      1 # regression test for 1f4ff634
      2 
      3 # warning! headaches can occur
      4 # when trying to figure out what
      5 # the test is doing!
      6 
      7 export
      8 function w $t0() {
      9 @start
     10 @loop
     11 	%x0 =w phi @start 256, @loop %y0
     12 	%y0 =w phi @start 128, @loop %y1
     13 	%y1 =w shr %x0, 1
     14 	jnz %y1, @loop, @end
     15 @end
     16 	ret %x0
     17 }
     18 
     19 export
     20 function w $t1() {  # swapped phis
     21 @start
     22 @loop
     23 	%y0 =w phi @start 128, @loop %y1
     24 	%x0 =w phi @start 256, @loop %y0
     25 	%y1 =w shr %x0, 1
     26 	jnz %y1, @loop, @end
     27 @end
     28 	ret %x0
     29 }
     30 
     31 # >>> driver
     32 # extern int t0(void), t1(void);
     33 # int main() { return !(t0() == 1 && t1() == 1);}
     34 # <<<