libqbe/test/_spill3.ssa

25 lines
368 B
Text
Raw Normal View History

2015-08-07 20:28:21 -04:00
# make sure comparisons
# never get their two
# operands in memory
# run with NReg == 3, or
# adapt it!
2015-09-18 12:27:50 -04:00
function $test() {
2015-09-14 18:06:29 -04:00
@start
2016-02-11 20:02:31 -05:00
%a =w loadw $a
%b =w loadw $a
2015-08-07 20:28:21 -04:00
2015-09-14 18:06:29 -04:00
@loop
2015-08-07 20:28:21 -04:00
%c =w phi @start 0, @loop %f
%d =w phi @start 0, @loop %g
%e =w phi @start 0, @loop %h
%f =w add %c, %d
%g =w add %c, %e
%h =w add %e, %d
2016-02-11 20:02:31 -05:00
%x =w cslew %a, %b
2015-08-07 20:28:21 -04:00
jnz %x, @loop, @end
2015-09-14 18:06:29 -04:00
@end
ret
}