Updated hw6 to a newer version
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
9224001a22
commit
0c04936ccf
356 changed files with 8408 additions and 4725 deletions
20
hw6/llprograms/sp20_hw3/many_calls.ll
Normal file
20
hw6/llprograms/sp20_hw3/many_calls.ll
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
define void @foo(i64 %a, i64 %b, i64 %c, i64 %d, i64 %e, i64 %f, i64 %g) {
|
||||
ret void
|
||||
}
|
||||
|
||||
define i64 @main(i64 %argc, i8** %arcv) {
|
||||
%1 = alloca i64
|
||||
store i64 9999999, i64* %1
|
||||
br label %loop_condition
|
||||
loop_condition:
|
||||
%2 = load i64, i64* %1
|
||||
%3 = icmp sgt i64 %2, 0
|
||||
br i1 %3, label %loop_body, label %post_loop
|
||||
loop_body:
|
||||
call void @foo(i64 0, i64 0, i64 0, i64 0, i64 0, i64 0, i64 0)
|
||||
%5 = sub i64 %2, 1
|
||||
store i64 %5, i64* %1
|
||||
br label %loop_condition
|
||||
post_loop:
|
||||
ret i64 0
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue