turn test files in one function definition

This commit is contained in:
Quentin Carbonneaux 2015-09-07 22:11:43 -04:00
parent 87ab8941ed
commit a1b3e82dc9
16 changed files with 114 additions and 82 deletions

View file

@ -2,22 +2,24 @@
# flow graph that exposes poor
# handling of looping constructs
@start
function $test {
@start
%ten =w copy 10
%dum =w copy 0 # dummy live-through temporary
@loop
@loop
%alt =w phi @start 0, @left %alt1, @right %alt1
%cnt =w phi @start 100, @left %cnt, @right %cnt1
%alt1 =w sub 1, %alt
jnz %alt1, @right, @left
@left
@left
%x =w phi @loop 10, @left %x1
%x1 =w sub %x, 1
%z =w copy %x
jnz %z, @left, @loop
@right
@right
%cnt1 =w sub %cnt, %ten
jnz %cnt1, @loop, @end
@end
@end
%ret =w add %cnt, %dum
ret
}