1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
3 ; CHECK-LABEL: $ip2state$main:
4 ; CHECK-NEXT: .long .Lfunc_begin4@IMGREL
5 ; CHECK-NEXT: .long -1 # ToState
6 ; CHECK-NEXT: .long .Ltmp
7 ; CHECK-NEXT: .long 0 # ToState
8 ; CHECK-NEXT: .long .Ltmp
9 ; CHECK-NEXT: .long 4 # ToState
10 ; CHECK-NEXT: .long .Ltmp
11 ; CHECK: .long 5 # ToState
12 ; CHECK-NEXT: .long .Ltmp
13 ; CHECK-NEXT: .long 4 # ToState
14 ; CHECK-NEXT: .long .Ltmp
15 ; CHECK-NEXT: .long 0 # ToState
16 ; CHECK-NEXT: .long .Ltmp
17 ; CHECK-NEXT: .long 2 # ToState
18 ; CHECK-NEXT: .long .Ltmp
19 ; CHECK-NEXT: .long 3 # ToState
20 ; CHECK-NEXT: .long .Ltmp
21 ; CHECK-NEXT: .long 0 # ToState
22 ; CHECK-NEXT: .long .Ltmp
23 ; CHECK-NEXT: .long 1 # ToState
24 ; CHECK-NEXT: .long .Ltmp
25 ; CHECK-NEXT: .long 0 # ToState
26 ; CHECK-NEXT: .long .Ltmp
27 ; CHECK-NEXT: .long -1 # ToState
29 ; ModuleID = 'windows-seh-EHa-CppCondiTemps.cpp'
30 source_filename = "windows-seh-EHa-CppCondiTemps.cpp"
31 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
32 target triple = "x86_64-unknown-windows-msvc"
34 %class.B1 = type { i32 }
35 %class.B2 = type { %class.B1 }
36 %class.B3 = type { %class.B2 }
38 $"??1B1@@QEAA@XZ" = comdat any
40 $"??1B2@@QEAA@XZ" = comdat any
42 $"??0B2@@QEAA@XZ" = comdat any
44 $"??0B3@@QEAA@XZ" = comdat any
46 $"??1B3@@QEAA@XZ" = comdat any
48 $"??0B1@@QEAA@XZ" = comdat any
50 $"??_C@_0N@FMGAAAAM@in?5B1?5Dtor?5?6?$AA@" = comdat any
52 $"??_C@_0N@GFONDMMJ@in?5B2?5Dtor?5?6?$AA@" = comdat any
54 $"??_C@_0N@HCJGCIIK@in?5B3?5Dtor?5?6?$AA@" = comdat any
56 @"?xxxx@@3HA" = dso_local global i32 0, align 4
57 @"?ptr@@3PEAHEA" = dso_local global ptr null, align 8
58 @"??_C@_0N@FMGAAAAM@in?5B1?5Dtor?5?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [13 x i8] c"in B1 Dtor \0A\00", comdat, align 1
59 @"??_C@_0N@GFONDMMJ@in?5B2?5Dtor?5?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [13 x i8] c"in B2 Dtor \0A\00", comdat, align 1
60 @"??_C@_0N@HCJGCIIK@in?5B3?5Dtor?5?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [13 x i8] c"in B3 Dtor \0A\00", comdat, align 1
62 ; Function Attrs: noinline nounwind optnone mustprogress
63 define dso_local i32 @"?foo@@YAHH@Z"(i32 %a) #0 {
65 %a.addr = alloca i32, align 4
66 store i32 %a, ptr %a.addr, align 4
67 %0 = load i32, ptr @"?xxxx@@3HA", align 4
68 %1 = load i32, ptr %a.addr, align 4
69 %add = add nsw i32 %0, %1
73 ; Function Attrs: noinline optnone mustprogress
74 define dso_local i32 @"?bar@@YAHHVB1@@VB2@@@Z"(i32 %j, i32 %b1Bar.coerce, i32 %b2Bar.coerce) #1 personality ptr @__CxxFrameHandler3 {
76 %b1Bar = alloca %class.B1, align 4
77 %b2Bar = alloca %class.B2, align 4
78 %j.addr = alloca i32, align 4
79 %ww = alloca i32, align 4
80 %coerce.dive = getelementptr inbounds %class.B1, ptr %b1Bar, i32 0, i32 0
81 store i32 %b1Bar.coerce, ptr %coerce.dive, align 4
82 %coerce.dive1 = getelementptr inbounds %class.B2, ptr %b2Bar, i32 0, i32 0
83 %coerce.dive2 = getelementptr inbounds %class.B1, ptr %coerce.dive1, i32 0, i32 0
84 store i32 %b2Bar.coerce, ptr %coerce.dive2, align 4
85 invoke void @llvm.seh.scope.begin()
86 to label %invoke.cont unwind label %ehcleanup7
88 invoke.cont: ; preds = %entry
89 invoke void @llvm.seh.scope.begin()
90 to label %invoke.cont3 unwind label %ehcleanup
92 invoke.cont3: ; preds = %invoke.cont
93 store i32 %j, ptr %j.addr, align 4
94 %0 = load i32, ptr %j.addr, align 4
95 %cmp = icmp sgt i32 %0, 0
96 br i1 %cmp, label %if.then, label %if.else
98 if.then: ; preds = %invoke.cont3
99 %data = getelementptr inbounds %class.B1, ptr %b1Bar, i32 0, i32 0
100 %1 = load i32, ptr %data, align 4
101 store i32 %1, ptr %ww, align 4
104 if.else: ; preds = %invoke.cont3
105 %2 = bitcast ptr %b2Bar to ptr
106 %data4 = getelementptr inbounds %class.B1, ptr %2, i32 0, i32 0
107 %3 = load i32, ptr %data4, align 4
108 store i32 %3, ptr %ww, align 4
111 if.end: ; preds = %if.else, %if.then
112 %4 = load i32, ptr %ww, align 4
113 %5 = load ptr, ptr @"?ptr@@3PEAHEA", align 8
114 %6 = load i32, ptr %5, align 4
115 %add = add nsw i32 %4, %6
116 invoke void @llvm.seh.scope.end()
117 to label %invoke.cont5 unwind label %ehcleanup
119 invoke.cont5: ; preds = %if.end
120 call void @"??1B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b1Bar) #8
121 invoke void @llvm.seh.scope.end()
122 to label %invoke.cont6 unwind label %ehcleanup7
124 ehcleanup: ; preds = %if.end, %invoke.cont
125 %7 = cleanuppad within none []
126 call void @"??1B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b1Bar) #8 [ "funclet"(token %7) ]
127 cleanupret from %7 unwind label %ehcleanup7
129 invoke.cont6: ; preds = %invoke.cont5
130 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b2Bar) #8
133 ehcleanup7: ; preds = %invoke.cont5, %ehcleanup, %entry
134 %8 = cleanuppad within none []
135 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b2Bar) #8 [ "funclet"(token %8) ]
136 cleanupret from %8 unwind to caller
139 ; Function Attrs: nounwind readnone
140 declare dso_local void @llvm.seh.scope.begin() #2
142 declare dso_local i32 @__CxxFrameHandler3(...)
144 ; Function Attrs: nounwind readnone
145 declare dso_local void @llvm.seh.scope.end() #2
147 ; Function Attrs: noinline nounwind optnone
148 define linkonce_odr dso_local void @"??1B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %this) unnamed_addr #3 comdat align 2 {
150 %this.addr = alloca ptr, align 8
151 store ptr %this, ptr %this.addr, align 8
152 %this1 = load ptr, ptr %this.addr, align 8
153 call void (...) @"?printf@@YAXZZ"(ptr @"??_C@_0N@FMGAAAAM@in?5B1?5Dtor?5?6?$AA@")
157 ; Function Attrs: noinline nounwind optnone
158 define linkonce_odr dso_local void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %this) unnamed_addr #3 comdat align 2 personality ptr @__CxxFrameHandler3 {
160 %this.addr = alloca ptr, align 8
161 store ptr %this, ptr %this.addr, align 8
162 %this1 = load ptr, ptr %this.addr, align 8
163 invoke void @llvm.seh.scope.begin()
164 to label %invoke.cont unwind label %ehcleanup
166 invoke.cont: ; preds = %entry
167 invoke void (...) @"?printf@@YAXZZ"(ptr @"??_C@_0N@GFONDMMJ@in?5B2?5Dtor?5?6?$AA@")
168 to label %invoke.cont2 unwind label %ehcleanup
170 invoke.cont2: ; preds = %invoke.cont
171 invoke void @llvm.seh.scope.end()
172 to label %invoke.cont3 unwind label %ehcleanup
174 invoke.cont3: ; preds = %invoke.cont2
175 %0 = bitcast ptr %this1 to ptr
176 call void @"??1B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %0) #8
179 ehcleanup: ; preds = %invoke.cont2, %invoke.cont, %entry
180 %1 = cleanuppad within none []
181 %2 = bitcast ptr %this1 to ptr
182 call void @"??1B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %2) #8 [ "funclet"(token %1) ]
183 cleanupret from %1 unwind to caller
186 ; Function Attrs: noinline optnone mustprogress
187 define dso_local void @"?goo@@YA?AVB1@@H@Z"(ptr noalias sret(%class.B1) align 4 %agg.result, i32 %w) #1 personality ptr @__CxxFrameHandler3 {
189 %result.ptr = alloca ptr, align 8
190 %w.addr = alloca i32, align 4
191 %b2ingoo = alloca %class.B2, align 4
192 %0 = bitcast ptr %agg.result to ptr
193 store ptr %0, ptr %result.ptr, align 8
194 store i32 %w, ptr %w.addr, align 4
195 %call = call ptr @"??0B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b2ingoo)
196 invoke void @llvm.seh.scope.begin()
197 to label %invoke.cont unwind label %ehcleanup
199 invoke.cont: ; preds = %entry
200 %1 = load i32, ptr %w.addr, align 4
201 %2 = bitcast ptr %b2ingoo to ptr
202 %data = getelementptr inbounds %class.B1, ptr %2, i32 0, i32 0
203 %3 = load i32, ptr %data, align 4
204 %add = add nsw i32 %3, %1
205 store i32 %add, ptr %data, align 4
206 %4 = bitcast ptr %b2ingoo to ptr
207 %5 = bitcast ptr %agg.result to ptr
208 %6 = bitcast ptr %4 to ptr
209 call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %6, i64 4, i1 false)
210 invoke void @llvm.seh.scope.end()
211 to label %invoke.cont1 unwind label %ehcleanup
213 invoke.cont1: ; preds = %invoke.cont
214 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b2ingoo) #8
217 ehcleanup: ; preds = %invoke.cont, %entry
218 %7 = cleanuppad within none []
219 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b2ingoo) #8 [ "funclet"(token %7) ]
220 cleanupret from %7 unwind to caller
223 ; Function Attrs: noinline optnone
224 define linkonce_odr dso_local ptr @"??0B2@@QEAA@XZ"(ptr nonnull returned align 4 dereferenceable(4) %this) unnamed_addr #4 comdat align 2 personality ptr @__CxxFrameHandler3 {
226 %this.addr = alloca ptr, align 8
227 store ptr %this, ptr %this.addr, align 8
228 %this1 = load ptr, ptr %this.addr, align 8
229 %0 = bitcast ptr %this1 to ptr
230 %call = call ptr @"??0B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %0)
231 invoke void @llvm.seh.scope.begin()
232 to label %invoke.cont unwind label %ehcleanup
234 invoke.cont: ; preds = %entry
235 %1 = bitcast ptr %this1 to ptr
236 %data = getelementptr inbounds %class.B1, ptr %1, i32 0, i32 0
237 %2 = load i32, ptr %data, align 4
238 %add = add nsw i32 %2, 222
239 %call2 = call i32 @"?foo@@YAHH@Z"(i32 %add)
240 invoke void @llvm.seh.scope.end()
241 to label %invoke.cont3 unwind label %ehcleanup
243 invoke.cont3: ; preds = %invoke.cont
246 ehcleanup: ; preds = %invoke.cont, %entry
247 %3 = cleanuppad within none []
248 %4 = bitcast ptr %this1 to ptr
249 call void @"??1B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %4) #8 [ "funclet"(token %3) ]
250 cleanupret from %3 unwind to caller
253 ; Function Attrs: argmemonly nofree nosync nounwind willreturn
254 declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5
256 ; Function Attrs: noinline norecurse optnone mustprogress
257 define dso_local i32 @main() #6 personality ptr @__CxxFrameHandler3 {
259 %retval = alloca i32, align 4
260 %b3inmain = alloca %class.B3, align 4
261 %m = alloca i32, align 4
262 %ref.tmp = alloca %class.B2, align 4
263 %cleanup.cond = alloca i1, align 1
264 %ref.tmp5 = alloca %class.B3, align 4
265 %cleanup.cond9 = alloca i1, align 1
266 %i = alloca i32, align 4
267 %agg.tmp = alloca %class.B2, align 4
268 %agg.tmp28 = alloca %class.B1, align 4
269 %b1fromgoo = alloca %class.B1, align 4
270 store i32 0, ptr %retval, align 4
271 %call = call ptr @"??0B3@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b3inmain)
272 invoke void @llvm.seh.scope.begin()
273 to label %invoke.cont unwind label %ehcleanup50
275 invoke.cont: ; preds = %entry
276 %0 = load i32, ptr @"?xxxx@@3HA", align 4
277 %cmp = icmp sgt i32 %0, 1
278 store i1 false, ptr %cleanup.cond, align 1
279 store i1 false, ptr %cleanup.cond9, align 1
280 br i1 %cmp, label %cond.true, label %cond.false
282 cond.true: ; preds = %invoke.cont
283 %call2 = invoke ptr @"??0B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %ref.tmp)
284 to label %invoke.cont1 unwind label %ehcleanup50
286 invoke.cont1: ; preds = %cond.true
287 invoke void @llvm.seh.scope.begin()
288 to label %invoke.cont3 unwind label %ehcleanup21
290 invoke.cont3: ; preds = %invoke.cont1
291 store i1 true, ptr %cleanup.cond, align 1
292 %1 = bitcast ptr %ref.tmp to ptr
293 %data = getelementptr inbounds %class.B1, ptr %1, i32 0, i32 0
294 %2 = load i32, ptr %data, align 4
295 %call4 = call i32 @"?foo@@YAHH@Z"(i32 99)
296 %add = add nsw i32 %2, %call4
299 cond.false: ; preds = %invoke.cont
300 %call7 = invoke ptr @"??0B3@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %ref.tmp5)
301 to label %invoke.cont6 unwind label %ehcleanup21
303 invoke.cont6: ; preds = %cond.false
304 invoke void @llvm.seh.scope.begin()
305 to label %invoke.cont8 unwind label %ehcleanup
307 invoke.cont8: ; preds = %invoke.cont6
308 store i1 true, ptr %cleanup.cond9, align 1
309 %3 = bitcast ptr %ref.tmp5 to ptr
310 %data10 = getelementptr inbounds %class.B1, ptr %3, i32 0, i32 0
311 %4 = load i32, ptr %data10, align 4
312 %call11 = call i32 @"?foo@@YAHH@Z"(i32 88)
313 %add12 = add nsw i32 %4, %call11
316 cond.end: ; preds = %invoke.cont8, %invoke.cont3
317 %cond = phi i32 [ %add, %invoke.cont3 ], [ %add12, %invoke.cont8 ]
318 invoke void @llvm.seh.scope.end()
319 to label %invoke.cont13 unwind label %ehcleanup
321 invoke.cont13: ; preds = %cond.end
322 %cleanup.is_active = load i1, ptr %cleanup.cond9, align 1
323 br i1 %cleanup.is_active, label %cleanup.action, label %cleanup.done
325 cleanup.action: ; preds = %invoke.cont13
326 call void @"??1B3@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %ref.tmp5) #8
327 br label %cleanup.done
329 cleanup.done: ; preds = %cleanup.action, %invoke.cont13
330 invoke void @llvm.seh.scope.end()
331 to label %invoke.cont17 unwind label %ehcleanup21
333 invoke.cont17: ; preds = %cleanup.done
334 %cleanup.is_active18 = load i1, ptr %cleanup.cond, align 1
335 br i1 %cleanup.is_active18, label %cleanup.action19, label %cleanup.done20
337 cleanup.action19: ; preds = %invoke.cont17
338 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %ref.tmp) #8
339 br label %cleanup.done20
341 cleanup.done20: ; preds = %cleanup.action19, %invoke.cont17
342 store i32 %cond, ptr %m, align 4
343 %call26 = invoke ptr @"??0B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %agg.tmp)
344 to label %invoke.cont25 unwind label %ehcleanup50
346 invoke.cont25: ; preds = %cleanup.done20
347 invoke void @llvm.seh.scope.begin()
348 to label %invoke.cont27 unwind label %ehcleanup38
350 invoke.cont27: ; preds = %invoke.cont25
351 %call30 = invoke ptr @"??0B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %agg.tmp28)
352 to label %invoke.cont29 unwind label %ehcleanup38
354 invoke.cont29: ; preds = %invoke.cont27
355 invoke void @llvm.seh.scope.begin()
356 to label %invoke.cont31 unwind label %ehcleanup36
358 invoke.cont31: ; preds = %invoke.cont29
359 %call32 = call i32 @"?foo@@YAHH@Z"(i32 0)
360 %coerce.dive = getelementptr inbounds %class.B1, ptr %agg.tmp28, i32 0, i32 0
361 %5 = load i32, ptr %coerce.dive, align 4
362 %coerce.dive33 = getelementptr inbounds %class.B2, ptr %agg.tmp, i32 0, i32 0
363 %coerce.dive34 = getelementptr inbounds %class.B1, ptr %coerce.dive33, i32 0, i32 0
364 %6 = load i32, ptr %coerce.dive34, align 4
365 invoke void @llvm.seh.scope.end()
366 to label %invoke.cont35 unwind label %ehcleanup36
368 invoke.cont35: ; preds = %invoke.cont31
369 invoke void @llvm.seh.scope.end()
370 to label %invoke.cont37 unwind label %ehcleanup38
372 invoke.cont37: ; preds = %invoke.cont35
373 %call40 = invoke i32 @"?bar@@YAHHVB1@@VB2@@@Z"(i32 %call32, i32 %5, i32 %6)
374 to label %invoke.cont39 unwind label %ehcleanup50
376 invoke.cont39: ; preds = %invoke.cont37
377 store i32 %call40, ptr %i, align 4
378 %7 = load i32, ptr %i, align 4
379 invoke void @"?goo@@YA?AVB1@@H@Z"(ptr sret(%class.B1) align 4 %b1fromgoo, i32 %7)
380 to label %invoke.cont41 unwind label %ehcleanup50
382 invoke.cont41: ; preds = %invoke.cont39
383 invoke void @llvm.seh.scope.begin()
384 to label %invoke.cont42 unwind label %ehcleanup48
386 invoke.cont42: ; preds = %invoke.cont41
387 %8 = load i32, ptr %m, align 4
388 %data43 = getelementptr inbounds %class.B1, ptr %b1fromgoo, i32 0, i32 0
389 %9 = load i32, ptr %data43, align 4
390 %add44 = add nsw i32 %8, %9
391 %10 = bitcast ptr %b3inmain to ptr
392 %data45 = getelementptr inbounds %class.B1, ptr %10, i32 0, i32 0
393 %11 = load i32, ptr %data45, align 4
394 %add46 = add nsw i32 %add44, %11
395 store i32 %add46, ptr %retval, align 4
396 invoke void @llvm.seh.scope.end()
397 to label %invoke.cont47 unwind label %ehcleanup48
399 ehcleanup: ; preds = %cond.end, %invoke.cont6
400 %12 = cleanuppad within none []
401 %cleanup.is_active14 = load i1, ptr %cleanup.cond9, align 1
402 br i1 %cleanup.is_active14, label %cleanup.action15, label %cleanup.done16
404 cleanup.action15: ; preds = %ehcleanup
405 call void @"??1B3@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %ref.tmp5) #8 [ "funclet"(token %12) ]
406 br label %cleanup.done16
408 cleanup.done16: ; preds = %cleanup.action15, %ehcleanup
409 cleanupret from %12 unwind label %ehcleanup21
411 ehcleanup21: ; preds = %cleanup.done, %cleanup.done16, %cond.false, %invoke.cont1
412 %13 = cleanuppad within none []
413 %cleanup.is_active22 = load i1, ptr %cleanup.cond, align 1
414 br i1 %cleanup.is_active22, label %cleanup.action23, label %cleanup.done24
416 cleanup.action23: ; preds = %ehcleanup21
417 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %ref.tmp) #8 [ "funclet"(token %13) ]
418 br label %cleanup.done24
420 cleanup.done24: ; preds = %cleanup.action23, %ehcleanup21
421 cleanupret from %13 unwind label %ehcleanup50
423 ehcleanup36: ; preds = %invoke.cont31, %invoke.cont29
424 %14 = cleanuppad within none []
425 call void @"??1B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %agg.tmp28) #8 [ "funclet"(token %14) ]
426 cleanupret from %14 unwind label %ehcleanup38
428 ehcleanup38: ; preds = %invoke.cont35, %ehcleanup36, %invoke.cont27, %invoke.cont25
429 %15 = cleanuppad within none []
430 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %agg.tmp) #8 [ "funclet"(token %15) ]
431 cleanupret from %15 unwind label %ehcleanup50
433 invoke.cont47: ; preds = %invoke.cont42
434 call void @"??1B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b1fromgoo) #8
435 invoke void @llvm.seh.scope.end()
436 to label %invoke.cont49 unwind label %ehcleanup50
438 ehcleanup48: ; preds = %invoke.cont42, %invoke.cont41
439 %16 = cleanuppad within none []
440 call void @"??1B1@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b1fromgoo) #8 [ "funclet"(token %16) ]
441 cleanupret from %16 unwind label %ehcleanup50
443 invoke.cont49: ; preds = %invoke.cont47
444 call void @"??1B3@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b3inmain) #8
445 %17 = load i32, ptr %retval, align 4
448 ehcleanup50: ; preds = %invoke.cont47, %ehcleanup48, %invoke.cont39, %invoke.cont37, %ehcleanup38, %cleanup.done20, %cleanup.done24, %cond.true, %entry
449 %18 = cleanuppad within none []
450 call void @"??1B3@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %b3inmain) #8 [ "funclet"(token %18) ]
451 cleanupret from %18 unwind to caller
454 ; Function Attrs: noinline optnone
455 define linkonce_odr dso_local ptr @"??0B3@@QEAA@XZ"(ptr nonnull returned align 4 dereferenceable(4) %this) unnamed_addr #4 comdat align 2 personality ptr @__CxxFrameHandler3 {
457 %this.addr = alloca ptr, align 8
458 store ptr %this, ptr %this.addr, align 8
459 %this1 = load ptr, ptr %this.addr, align 8
460 %0 = bitcast ptr %this1 to ptr
461 %call = call ptr @"??0B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %0)
462 invoke void @llvm.seh.scope.begin()
463 to label %invoke.cont unwind label %ehcleanup
465 invoke.cont: ; preds = %entry
466 %1 = bitcast ptr %this1 to ptr
467 %data = getelementptr inbounds %class.B1, ptr %1, i32 0, i32 0
468 %2 = load i32, ptr %data, align 4
469 %add = add nsw i32 %2, 333
470 %call2 = call i32 @"?foo@@YAHH@Z"(i32 %add)
471 invoke void @llvm.seh.scope.end()
472 to label %invoke.cont3 unwind label %ehcleanup
474 invoke.cont3: ; preds = %invoke.cont
477 ehcleanup: ; preds = %invoke.cont, %entry
478 %3 = cleanuppad within none []
479 %4 = bitcast ptr %this1 to ptr
480 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %4) #8 [ "funclet"(token %3) ]
481 cleanupret from %3 unwind to caller
484 ; Function Attrs: noinline nounwind optnone
485 define linkonce_odr dso_local void @"??1B3@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %this) unnamed_addr #3 comdat align 2 personality ptr @__CxxFrameHandler3 {
487 %this.addr = alloca ptr, align 8
488 store ptr %this, ptr %this.addr, align 8
489 %this1 = load ptr, ptr %this.addr, align 8
490 invoke void @llvm.seh.scope.begin()
491 to label %invoke.cont unwind label %ehcleanup
493 invoke.cont: ; preds = %entry
494 invoke void (...) @"?printf@@YAXZZ"(ptr @"??_C@_0N@HCJGCIIK@in?5B3?5Dtor?5?6?$AA@")
495 to label %invoke.cont2 unwind label %ehcleanup
497 invoke.cont2: ; preds = %invoke.cont
498 invoke void @llvm.seh.scope.end()
499 to label %invoke.cont3 unwind label %ehcleanup
501 invoke.cont3: ; preds = %invoke.cont2
502 %0 = bitcast ptr %this1 to ptr
503 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %0) #8
506 ehcleanup: ; preds = %invoke.cont2, %invoke.cont, %entry
507 %1 = cleanuppad within none []
508 %2 = bitcast ptr %this1 to ptr
509 call void @"??1B2@@QEAA@XZ"(ptr nonnull align 4 dereferenceable(4) %2) #8 [ "funclet"(token %1) ]
510 cleanupret from %1 unwind to caller
513 ; Function Attrs: noinline nounwind optnone
514 define linkonce_odr dso_local ptr @"??0B1@@QEAA@XZ"(ptr nonnull returned align 4 dereferenceable(4) %this) unnamed_addr #3 comdat align 2 {
516 %this.addr = alloca ptr, align 8
517 store ptr %this, ptr %this.addr, align 8
518 %this1 = load ptr, ptr %this.addr, align 8
519 %data = getelementptr inbounds %class.B1, ptr %this1, i32 0, i32 0
520 store i32 90, ptr %data, align 4
521 %data2 = getelementptr inbounds %class.B1, ptr %this1, i32 0, i32 0
522 %0 = load i32, ptr %data2, align 4
523 %add = add nsw i32 %0, 111
524 %call = call i32 @"?foo@@YAHH@Z"(i32 %add)
528 declare dso_local void @"?printf@@YAXZZ"(...) #7
530 attributes #0 = { noinline nounwind optnone mustprogress "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
531 attributes #1 = { noinline optnone mustprogress "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
532 attributes #2 = { nounwind readnone }
533 attributes #3 = { noinline nounwind optnone "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
534 attributes #4 = { noinline optnone "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
535 attributes #5 = { argmemonly nofree nosync nounwind willreturn }
536 attributes #6 = { noinline norecurse optnone mustprogress "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
537 attributes #7 = { "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
538 attributes #8 = { nounwind }
540 !llvm.module.flags = !{!0, !1}
542 !0 = !{i32 1, !"wchar_size", i32 2}
543 !1 = !{i32 2, !"eh-asynch", i32 1}