1 ; RUN: opt < %s -passes=instcombine -S
6 %C = type <{ ptr, i32, [4 x i8] }>
10 @bar= external thread_local global %A, align 8
12 declare i32 @__gxx_personality_v0(...)
14 ; Function Attrs: inlinehint sanitize_memory uwtable
15 define void @foo(i1 %c1) local_unnamed_addr #0 comdat align 2 personality ptr @__gxx_personality_v0 {
17 %0 = load ptr, ptr @bar, align 8
18 %1 = ptrtoint ptr %0 to i64
19 %count.i.i.i23 = getelementptr inbounds %C, ptr %0, i64 0, i32 1
20 store i32 0, ptr %count.i.i.i23, align 8
21 %2 = invoke ptr @_Znwm() #3
22 to label %invoke.cont unwind label %lpad
24 invoke.cont: ; preds = %entry
25 %call.i25 = invoke ptr @_Znwm() #3
26 to label %call.i.noexc unwind label %lpad4
28 call.i.noexc: ; preds = %invoke.cont
30 to label %invoke.cont5 unwind label %lpad.i
32 lpad.i: ; preds = %call.i.noexc
33 %3 = landingpad { ptr, i32 }
37 invoke.cont5: ; preds = %call.i.noexc
38 %4 = ptrtoint ptr %call.i25 to i64
40 to label %invoke.cont16 unwind label %lpad15
42 invoke.cont16: ; preds = %invoke.cont5
45 lpad: ; preds = %entry
46 %5 = landingpad { ptr, i32 }
50 lpad4: ; preds = %invoke.cont
51 %6 = landingpad { ptr, i32 }
55 ehcleanup: ; preds = %lpad.i
58 lpad15: ; preds = %invoke.cont5
59 %7 = landingpad { ptr, i32 }
63 ehcleanup21: ; preds = %lpad15, %ehcleanup
64 %actual_other.sroa.0.0 = phi i64 [ %1, %ehcleanup ], [ %4, %lpad15 ]
65 %8 = inttoptr i64 %actual_other.sroa.0.0 to ptr
66 br i1 %c1, label %_ZN4CGAL6HandleD2Ev.exit, label %land.lhs.true.i
68 land.lhs.true.i: ; preds = %ehcleanup21
69 %count.i = getelementptr inbounds %C, ptr %8, i64 0, i32 1
70 %9 = load i32, ptr %count.i, align 8
73 _ZN4CGAL6HandleD2Ev.exit: ; preds = %ehcleanup21
74 resume { ptr, i32 } undef
77 ; Function Attrs: nobuiltin
78 declare noalias nonnull ptr @_Znwm() local_unnamed_addr #1
80 ; Function Attrs: sanitize_memory uwtable
81 declare void @scale() local_unnamed_addr #2 align 2
83 ; Function Attrs: sanitize_memory uwtable
84 declare void @lazy() unnamed_addr #2 align 2
86 attributes #0 = { inlinehint sanitize_memory uwtable}
87 attributes #1 = { nobuiltin }
88 attributes #2 = { sanitize_memory uwtable }
89 attributes #3 = { builtin }