You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nudt-compiler-cpp/test_outputs/simple_add.ll

23 lines
458 B

declare i32 @getint()
declare i32 @getch()
declare void @putint(i32)
declare void @putch(i32)
declare i32 @getarray(i32*)
declare void @putarray(i32, i32*)
declare void @starttime()
declare void @stoptime()
define i32 @main() {
entry:
%t1 = alloca i32
%t2 = alloca i32
%t3 = alloca i32
br label %bbt0
bbt0:
store i32 1, i32* %t2
store i32 2, i32* %t3
%t4 = load i32, i32* %t2
%t5 = load i32, i32* %t3
%t6 = add i32 %t4, %t5
ret i32 %t6
}