1 ; RUN: opt < %s -instcombine -S
6 %C = type <{ i32 (...)**, 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() local_unnamed_addr #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
17 %0 = load %C*, %C** getelementptr inbounds (%A, %A* @bar, i64 0, i32 0, i32 0), align 8
18 %1 = ptrtoint %C* %0 to i64
19 %count.i.i.i23 = getelementptr inbounds %C, %C* %0, i64 0, i32 1
20 store i32 0, i32* %count.i.i.i23, align 8
21 %2 = invoke i8* @_Znwm() #3
22 to label %invoke.cont unwind label %lpad
24 invoke.cont: ; preds = %entry
25 %call.i25 = invoke i8* @_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 { i8*, i32 }
37 invoke.cont5: ; preds = %call.i.noexc
38 %4 = ptrtoint i8* %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 { i8*, i32 }
50 lpad4: ; preds = %invoke.cont
51 %6 = landingpad { i8*, i32 }
55 ehcleanup: ; preds = %lpad.i
58 lpad15: ; preds = %invoke.cont5
59 %7 = landingpad { i8*, 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 %C*
66 br i1 undef, label %_ZN4CGAL6HandleD2Ev.exit, label %land.lhs.true.i
68 land.lhs.true.i: ; preds = %ehcleanup21
69 %count.i = getelementptr inbounds %C, %C* %8, i64 0, i32 1
70 %9 = load i32, i32* %count.i, align 8
73 _ZN4CGAL6HandleD2Ev.exit: ; preds = %ehcleanup21
74 resume { i8*, i32 } undef
77 ; Function Attrs: nobuiltin
78 declare noalias nonnull i8* @_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 }