summary refs log tree commit diff
path: root/lisc/test/loop.ssa
blob: 876b1b0449e9627a82be945b6e45ca0568e1e1e9 (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
}