[PowerPC] Eliminate compares - add i32 sext/zext handling for SETULT/SETUGT
[llvm-core.git] / test / Transforms / PruneEH / pr26263.ll
blob17fafeb685057f432c241352817d1522d9785dc1
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"
5 declare void @neverthrows() nounwind
7 define void @test1() personality i32 (...)* @__CxxFrameHandler3 {
8   invoke void @neverthrows()
9           to label %try.cont unwind label %cleanuppad
11 try.cont:
12   ret void
14 cleanuppad:
15   %cp = cleanuppad within none []
16   br label %cleanupret
18 cleanupret:
19   cleanupret from %cp unwind to caller
22 ; CHECK-LABEL: define void @test1(
23 ; CHECK: call void @neverthrows()
25 ; CHECK: %[[cp:.*]] = cleanuppad within none []
26 ; CHECK-NEXT: unreachable
28 ; CHECK: cleanupret from %[[cp]] unwind to caller
30 define void @test2() personality i32 (...)* @__CxxFrameHandler3 {
31   invoke void @neverthrows()
32           to label %try.cont unwind label %catchswitch
34 try.cont:
35   ret void
37 catchswitch:
38   %cs = catchswitch within none [label %catchpad] unwind to caller
40 catchpad:
41   %cp = catchpad within %cs []
42   unreachable
44 ret:
45   ret void
48 ; CHECK-LABEL: define void @test2(
49 ; CHECK: call void @neverthrows()
51 ; CHECK: %[[cs:.*]] = catchswitch within none [label
53 ; CHECK: catchpad within %[[cs]] []
54 ; CHECK-NEXT: unreachable
56 declare i32 @__CxxFrameHandler3(...)