| Michael Gottesman | ccc93e7 | 2013-04-09 05:18:53 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -simplifycfg -S | FileCheck %s |
| 2 | |
| 3 | ; CHECK-NOT: invoke |
| Duncan Sands | a915b53 | 2007-11-22 22:24:59 +0000 | [diff] [blame] | 4 | |
| 5 | declare i32 @func(i8*) nounwind |
| 6 | |
| David Majnemer | 7fddecc | 2015-06-17 20:52:32 +0000 | [diff] [blame] | 7 | define i32 @test() personality i32 (...)* @__gxx_personality_v0 { |
| Duncan Sands | 5208d1a | 2007-11-28 17:07:01 +0000 | [diff] [blame] | 8 | invoke i32 @func( i8* null ) |
| Duncan Sands | a915b53 | 2007-11-22 22:24:59 +0000 | [diff] [blame] | 9 | to label %Cont unwind label %Other ; <i32>:1 [#uses=0] |
| 10 | |
| 11 | Cont: ; preds = %0 |
| 12 | ret i32 0 |
| 13 | |
| 14 | Other: ; preds = %0 |
| David Majnemer | 7fddecc | 2015-06-17 20:52:32 +0000 | [diff] [blame] | 15 | landingpad { i8*, i32 } |
| Reid Kleckner | 96d0113 | 2015-02-11 01:23:16 +0000 | [diff] [blame] | 16 | catch i8* null |
| Duncan Sands | a915b53 | 2007-11-22 22:24:59 +0000 | [diff] [blame] | 17 | ret i32 1 |
| 18 | } |
| Reid Kleckner | 96d0113 | 2015-02-11 01:23:16 +0000 | [diff] [blame] | 19 | |
| 20 | declare i32 @__gxx_personality_v0(...) |