comparison test/CodeGen/WinEH/wineh-statenumbering.ll @ 100:7d135dc70f03 LLVM 3.9

LLVM 3.9
author Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp>
date Tue, 26 Jan 2016 22:53:40 +0900
parents afa8332a0e37
children 1172e4bd9c6f
comparison
equal deleted inserted replaced
96:6418606d0ead 100:7d135dc70f03
35 ; CHECK: invoke void @_CxxThrowException( 35 ; CHECK: invoke void @_CxxThrowException(
36 invoke void @_CxxThrowException(i8* %0, %eh.ThrowInfo* nonnull @_TI1H) #1 36 invoke void @_CxxThrowException(i8* %0, %eh.ThrowInfo* nonnull @_TI1H) #1
37 to label %unreachable.for.entry unwind label %catch.dispatch 37 to label %unreachable.for.entry unwind label %catch.dispatch
38 38
39 catch.dispatch: ; preds = %entry 39 catch.dispatch: ; preds = %entry
40 %1 = catchpad [i8* null, i32 u0x40, i8* null] to label %catch unwind label %catchendblock 40 %cs1 = catchswitch within none [label %catch] unwind to caller
41 41
42 catch: ; preds = %catch.dispatch 42 catch: ; preds = %catch.dispatch
43 %1 = catchpad within %cs1 [i8* null, i32 u0x40, i8* null]
43 ; CHECK: catch: 44 ; CHECK: catch:
44 ; CHECK: store i32 2 45 ; CHECK: store i32 2
45 ; CHECK: invoke void @_CxxThrowException( 46 ; CHECK: invoke void @_CxxThrowException(
46 invoke void @_CxxThrowException(i8* null, %eh.ThrowInfo* null) #1 47 invoke void @_CxxThrowException(i8* null, %eh.ThrowInfo* null) [ "funclet"(token %1) ]
47 to label %unreachable unwind label %catch.dispatch.1 48 to label %unreachable unwind label %catch.dispatch.1
48 49
49 catch.dispatch.1: ; preds = %catch 50 catch.dispatch.1: ; preds = %catch
50 %2 = catchpad [i8* null, i32 u0x40, i8* null] to label %catch.3 unwind label %catchendblock.2 51 %cs2 = catchswitch within %1 [label %catch.3] unwind to caller
51
52 catch.3: ; preds = %catch.dispatch.1 52 catch.3: ; preds = %catch.dispatch.1
53 %2 = catchpad within %cs2 [i8* null, i32 u0x40, i8* null]
53 ; CHECK: catch.3: 54 ; CHECK: catch.3:
54 ; CHECK: store i32 3 55 ; CHECK: store i32 3
55 ; CHECK: invoke void @g(i32 1) 56 ; CHECK: call void @g(i32 1)
56 invoke void @g(i32 1) 57 call void @g(i32 1)
57 to label %invoke.cont unwind label %catchendblock.2 58 catchret from %2 to label %try.cont
58 59
59 invoke.cont: ; preds = %catch.3 60 try.cont: ; preds = %catch.3
60 catchret %2 to label %try.cont
61
62 try.cont: ; preds = %invoke.cont
63 ; CHECK: try.cont: 61 ; CHECK: try.cont:
64 ; CHECK: store i32 1 62 ; CHECK: store i32 1
65 ; CHECK: invoke void @g(i32 2) 63 ; CHECK: call void @g(i32 2)
66 invoke void @g(i32 2) 64 call void @g(i32 2)
67 to label %invoke.cont.4 unwind label %catchendblock
68
69 invoke.cont.4: ; preds = %try.cont
70 unreachable 65 unreachable
71
72 catchendblock.2: ; preds = %catch.3, %catch.dispatch.1
73 catchendpad unwind label %catchendblock
74
75 catchendblock: ; preds = %catchendblock.2, %try.cont, %catch.dispatch
76 catchendpad unwind to caller
77 66
78 unreachable: ; preds = %catch 67 unreachable: ; preds = %catch
79 unreachable 68 unreachable
80 69
81 unreachable.for.entry: ; preds = %entry 70 unreachable.for.entry: ; preds = %entry
88 77
89 ; CHECK-LABEL: define i32 @nopads() 78 ; CHECK-LABEL: define i32 @nopads()
90 ; CHECK-NEXT: ret i32 0 79 ; CHECK-NEXT: ret i32 0
91 ; CHECK-NOT: __ehhandler$nopads 80 ; CHECK-NOT: __ehhandler$nopads
92 81
82 ; CHECK-LABEL: define void @PR25926()
83 define void @PR25926() personality i32 (...)* @__CxxFrameHandler3 {
84 entry:
85 ; CHECK: entry:
86 ; CHECK: store i32 -1
87 ; CHECK: store i32 0
88 ; CHECK: invoke void @_CxxThrowException(
89 invoke void @_CxxThrowException(i8* null, %eh.ThrowInfo* null)
90 to label %unreachable unwind label %catch.dispatch
91
92 catch.dispatch: ; preds = %entry
93 %0 = catchswitch within none [label %catch] unwind to caller
94
95 catch: ; preds = %catch.dispatch
96 %1 = catchpad within %0 [i8* null, i32 64, i8* null]
97 ; CHECK: catch:
98 ; CHECK: store i32 3
99 ; CHECK: invoke void @_CxxThrowException(
100 invoke void @_CxxThrowException(i8* null, %eh.ThrowInfo* null) [ "funclet"(token %1) ]
101 to label %unreachable1 unwind label %catch.dispatch1
102
103 catch.dispatch1: ; preds = %catch
104 %2 = catchswitch within %1 [label %catch2] unwind label %ehcleanup
105
106 catch2: ; preds = %catch.dispatch1
107 %3 = catchpad within %2 [i8* null, i32 64, i8* null]
108 catchret from %3 to label %try.cont
109
110 try.cont: ; preds = %catch2
111 ; CHECK: try.cont:
112 ; CHECK: store i32 1
113 ; CHECK: call void @dtor()
114 call void @dtor() #3 [ "funclet"(token %1) ]
115 catchret from %1 to label %try.cont4
116
117 try.cont4: ; preds = %try.cont
118 ret void
119
120 ehcleanup: ; preds = %catch.dispatch1
121 %4 = cleanuppad within %1 []
122 ; CHECK: ehcleanup:
123 ; CHECK: store i32 -1
124 ; CHECK: call void @dtor()
125 call void @dtor() #3 [ "funclet"(token %4) ]
126 cleanupret from %4 unwind to caller
127
128 unreachable: ; preds = %entry
129 unreachable
130
131 unreachable1: ; preds = %catch
132 unreachable
133 }
134
93 declare void @g(i32) #0 135 declare void @g(i32) #0
136
137 declare void @dtor()
94 138
95 declare x86_stdcallcc void @_CxxThrowException(i8*, %eh.ThrowInfo*) 139 declare x86_stdcallcc void @_CxxThrowException(i8*, %eh.ThrowInfo*)
96 140
97 declare i32 @__CxxFrameHandler3(...) 141 declare i32 @__CxxFrameHandler3(...)
98 142