Add all the assignment code.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
58c6b1f81c
commit
cfe502c598
1277 changed files with 48709 additions and 1 deletions
24
hw6/llprograms/analysis9_dce_opt.ll
Normal file
24
hw6/llprograms/analysis9_dce_opt.ll
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
define i64 @program(i64 %argc, i8** %argv) {
|
||||
%1 = alloca i64
|
||||
store i64 5, i64* %1
|
||||
%2 = alloca i64
|
||||
store i64 1, i64* %2
|
||||
br label %guard
|
||||
body:
|
||||
%5 = load i64, i64* %2
|
||||
%6 = load i64, i64* %1
|
||||
%7 = mul i64 %5, %6
|
||||
store i64 %7, i64* %1
|
||||
%8 = load i64, i64* %2
|
||||
%9 = add i64 %8, 1
|
||||
store i64 %9, i64* %2
|
||||
br label %guard
|
||||
end:
|
||||
%10 = load i64, i64* %1
|
||||
ret i64 %10
|
||||
guard:
|
||||
%3 = load i64, i64* %2
|
||||
%4 = icmp sle i64 %3, 10
|
||||
br i1 %4, label %body, label %end
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue