Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 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 | |
Dan Gohman | 3c7d308 | 2009-09-11 18:01:28 +0000 | [diff] [blame] | 5 | ; RUN: opt < %s -inline -disable-output |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 6 | |
Tanya Lattner | 4c4d0b8 | 2008-03-01 09:15:35 +0000 | [diff] [blame] | 7 | define linkonce void @foo() { |
| 8 | unwind |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 9 | } |
| 10 | |
Tanya Lattner | 4c4d0b8 | 2008-03-01 09:15:35 +0000 | [diff] [blame] | 11 | define i32 @test() { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 12 | BB1: |
Tanya Lattner | 4c4d0b8 | 2008-03-01 09:15:35 +0000 | [diff] [blame] | 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 | ret i32 %A |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 19 | } |
Tanya Lattner | 4c4d0b8 | 2008-03-01 09:15:35 +0000 | [diff] [blame] | 20 | |