Merging r258611:
[oota-llvm.git] / test / Transforms / PruneEH / pr26263.ll
1 ; RUN: opt -prune-eh -S < %s | FileCheck %s
2 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
3 target triple = "i386-pc-windows-msvc"
4
5 declare void @neverthrows() nounwind
6
7 define void @test1() personality i32 (...)* @__CxxFrameHandler3 {
8   invoke void @neverthrows()
9           to label %try.cont unwind label %cleanuppad
10
11 try.cont:
12   ret void
13
14 cleanuppad:
15   %cp = cleanuppad within none []
16   br label %cleanupret
17
18 cleanupret:
19   cleanupret from %cp unwind to caller
20 }
21
22 ; CHECK-LABEL: define void @test1(
23 ; CHECK: call void @neverthrows()
24
25 ; CHECK: %[[cp:.*]] = cleanuppad within none []
26 ; CHECK-NEXT: unreachable
27
28 ; CHECK: cleanupret from %[[cp]] unwind to caller
29
30 declare i32 @__CxxFrameHandler3(...)