91 lines · plain
1; RUN: opt < %s -passes=instcombine -S2; no crash3 4%A = type { %B }5%B = type { ptr}6%C = type <{ ptr, i32, [4 x i8] }>7 8$foo = comdat any9 10@bar= external thread_local global %A, align 811 12declare i32 @__gxx_personality_v0(...)13 14; Function Attrs: inlinehint sanitize_memory uwtable15define void @foo(i1 %c1) local_unnamed_addr #0 comdat align 2 personality ptr @__gxx_personality_v0 {16entry:17 %0 = load ptr, ptr @bar, align 818 %1 = ptrtoint ptr %0 to i6419 %count.i.i.i23 = getelementptr inbounds %C, ptr %0, i64 0, i32 120 store i32 0, ptr %count.i.i.i23, align 821 %2 = invoke ptr @_Znwm() #322 to label %invoke.cont unwind label %lpad23 24invoke.cont: ; preds = %entry25 %call.i25 = invoke ptr @_Znwm() #326 to label %call.i.noexc unwind label %lpad427 28call.i.noexc: ; preds = %invoke.cont29 invoke void @lazy()30 to label %invoke.cont5 unwind label %lpad.i31 32lpad.i: ; preds = %call.i.noexc33 %3 = landingpad { ptr, i32 }34 cleanup35 br label %ehcleanup36 37invoke.cont5: ; preds = %call.i.noexc38 %4 = ptrtoint ptr %call.i25 to i6439 invoke void @scale()40 to label %invoke.cont16 unwind label %lpad1541 42invoke.cont16: ; preds = %invoke.cont543 ret void44 45lpad: ; preds = %entry46 %5 = landingpad { ptr, i32 }47 cleanup48 unreachable49 50lpad4: ; preds = %invoke.cont51 %6 = landingpad { ptr, i32 }52 cleanup53 unreachable54 55ehcleanup: ; preds = %lpad.i56 br label %ehcleanup2157 58lpad15: ; preds = %invoke.cont559 %7 = landingpad { ptr, i32 }60 cleanup61 br label %ehcleanup2162 63ehcleanup21: ; preds = %lpad15, %ehcleanup64 %actual_other.sroa.0.0 = phi i64 [ %1, %ehcleanup ], [ %4, %lpad15 ]65 %8 = inttoptr i64 %actual_other.sroa.0.0 to ptr66 br i1 %c1, label %_ZN4CGAL6HandleD2Ev.exit, label %land.lhs.true.i67 68land.lhs.true.i: ; preds = %ehcleanup2169 %count.i = getelementptr inbounds %C, ptr %8, i64 0, i32 170 %9 = load i32, ptr %count.i, align 871 unreachable72 73_ZN4CGAL6HandleD2Ev.exit: ; preds = %ehcleanup2174 resume { ptr, i32 } undef75}76 77; Function Attrs: nobuiltin78declare noalias nonnull ptr @_Znwm() local_unnamed_addr #179 80; Function Attrs: sanitize_memory uwtable81declare void @scale() local_unnamed_addr #2 align 282 83; Function Attrs: sanitize_memory uwtable84declare void @lazy() unnamed_addr #2 align 285 86attributes #0 = { inlinehint sanitize_memory uwtable}87attributes #1 = { nobuiltin }88attributes #2 = { sanitize_memory uwtable }89attributes #3 = { builtin }90 91