2008-05-21 00:07:21 +02:00
|
|
|
; RUN: llvm-as %s -f -o %t.bc
|
2004-11-07 00:32:43 +01:00
|
|
|
; RUN: lli %t.bc > /dev/null
|
|
|
|
|
2008-03-10 08:21:50 +01:00
|
|
|
@A = global i32 0 ; <i32*> [#uses=1]
|
2003-10-19 01:54:45 +02:00
|
|
|
|
2008-03-10 08:21:50 +01:00
|
|
|
define i32 @main() {
|
|
|
|
%Ret = call i32 @test( i1 true, i32 0 ) ; <i32> [#uses=1]
|
|
|
|
ret i32 %Ret
|
2003-10-19 01:54:45 +02:00
|
|
|
}
|
|
|
|
|
2008-03-10 08:21:50 +01:00
|
|
|
define i32 @test(i1 %c, i32 %A) {
|
|
|
|
br i1 %c, label %Taken1, label %NotTaken
|
|
|
|
Cont: ; preds = %Taken1, %NotTaken
|
|
|
|
%V = phi i32 [ 0, %NotTaken ], [ sub (i32 ptrtoint (i32* @A to i32), i32 1234), %Taken1 ] ; <i32> [#uses=0]
|
|
|
|
ret i32 0
|
|
|
|
NotTaken: ; preds = %0
|
|
|
|
br label %Cont
|
|
|
|
Taken1: ; preds = %0
|
|
|
|
%B = icmp eq i32 %A, 0 ; <i1> [#uses=1]
|
|
|
|
br i1 %B, label %Cont, label %ExitError
|
|
|
|
ExitError: ; preds = %Taken1
|
|
|
|
ret i32 12
|
2003-10-19 01:54:45 +02:00
|
|
|
}
|
2008-03-10 08:21:50 +01:00
|
|
|
|