summary refs log tree commit diff
path: root/lisc/test/loop.ssa
blob: 831fcd756bcd20a1966783c1c44fab2a5fef3003 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# simple looping program
# sums all integers from 100 to 0

function $test {
 @start

 @loop
	%s  =w phi @start 100, @loop %s1
	%n  =w phi @start   0, @loop %n1
	%n1 =w sub %n, 1
	%s1 =w add %s, %n
	jnz %n1, @loop, @end

 @end
	ret
}