bfe04559bcac4067eaf6f90a71381bc78faab657
[oota-llvm.git] / test / Transforms / Inline / 2003-10-26-InlineInvokeExceptionDestPhi.ll
1 ; 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
5 ; RUN: opt < %s -inline -disable-output
6
7 define linkonce void @foo() {
8         unwind
9 }
10
11 define i32 @test() {
12 BB1:
13         invoke void @foo( )
14                         to label %Cont unwind label %Cont
15
16 Cont:           ; preds = %BB1, %BB1
17         %A = phi i32 [ 0, %BB1 ], [ 0, %BB1 ]           ; <i32> [#uses=1]
18         %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
19                  cleanup
20         ret i32 %A
21 }
22
23 declare i32 @__gxx_personality_v0(...)