2009-09-09 00:09:15 +00:00
|
|
|
; RUN: llc < %s -march=c
|
2004-11-06 21:40:51 +00:00
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
declare i32 @callee(i32, i32)
|
2003-06-28 17:52:38 +00:00
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
define i32 @test(i32 %X) {
|
|
|
|
; <label>:0
|
|
|
|
%A = invoke i32 @callee( i32 %X, i32 5 )
|
|
|
|
to label %Ok unwind label %Threw ; <i32> [#uses=1]
|
2003-06-28 17:52:38 +00:00
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
Ok: ; preds = %Threw, %0
|
|
|
|
%B = phi i32 [ %A, %0 ], [ -1, %Threw ] ; <i32> [#uses=1]
|
|
|
|
ret i32 %B
|
2003-06-28 17:52:38 +00:00
|
|
|
|
2008-02-19 01:41:04 +00:00
|
|
|
Threw: ; preds = %0
|
|
|
|
br label %Ok
|
2003-06-28 17:52:38 +00:00
|
|
|
}
|
2008-02-19 01:41:04 +00:00
|
|
|
|