if statements work
This commit is contained in:
23
debug/ir.ll
23
debug/ir.ll
@@ -2,14 +2,23 @@
|
||||
target triple = "x86_64-pc-windows-msvc"
|
||||
target datalayout = ""
|
||||
|
||||
define i32 @"test"()
|
||||
{
|
||||
test_entry:
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
@"true" = constant i1 1
|
||||
@"false" = constant i1 0
|
||||
define i32 @"main"()
|
||||
{
|
||||
main_entry:
|
||||
ret i32 123
|
||||
%".2" = alloca i32
|
||||
store i32 6, i32* %".2"
|
||||
%".4" = load i32, i32* %".2"
|
||||
%".5" = icmp eq i32 %".4", 5
|
||||
br i1 %".5", label %"main_entry.if", label %"main_entry.else"
|
||||
main_entry.if:
|
||||
store i32 0, i32* %".2"
|
||||
br label %"main_entry.endif"
|
||||
main_entry.else:
|
||||
store i32 1, i32* %".2"
|
||||
br label %"main_entry.endif"
|
||||
main_entry.endif:
|
||||
%".11" = load i32, i32* %".2"
|
||||
ret i32 %".11"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user