blob: 9afd45040ca97bf099f06528b221092b4c0ef737 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; The inliner is breaking inlining invoke instructions where there is a PHI
2; node in the exception destination, and the inlined function contains an
3; unwind instruction.
4
Dan Gohman3c7d3082009-09-11 18:01:28 +00005; RUN: opt < %s -inline -disable-output
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00007define linkonce void @foo() {
8 unwind
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009}
10
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000011define i32 @test() {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000012BB1:
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000013 invoke void @foo( )
14 to label %Cont unwind label %Cont
15
16Cont: ; preds = %BB1, %BB1
17 %A = phi i32 [ 0, %BB1 ], [ 0, %BB1 ] ; <i32> [#uses=1]
18 ret i32 %A
Dan Gohmanf17a25c2007-07-18 16:29:46 +000019}
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000020