blob: 9fe98e22063a2cf91d14bd5efd1bc2368f660f70 [file] [log] [blame]
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00001; RUN: llvm-as < %s | llc -march=c
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00003declare i32 @callee(i32, i32)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00005define i32 @test(i32 %X) {
6; <label>:0
7 %A = invoke i32 @callee( i32 %X, i32 5 )
8 to label %Ok unwind label %Threw ; <i32> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +000010Ok: ; preds = %Threw, %0
11 %B = phi i32 [ %A, %0 ], [ -1, %Threw ] ; <i32> [#uses=1]
12 ret i32 %B
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +000014Threw: ; preds = %0
15 br label %Ok
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016}
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +000017