106 lines · plain
1; RUN: llc < %s | FileCheck %s2 3; Started from this code:4; void f() {5; try {6; try {7; throw 42;8; } catch (int) {9; }10; try {11; throw 42;12; } catch (int) {13; }14; } catch (int) {15; }16; }17 18; Don't tail merge the calls.19; CHECK: calll __CxxThrowException@820; CHECK: calll __CxxThrowException@821 22; ModuleID = 'cppeh-pingpong.cpp'23target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"24target triple = "i686-pc-windows-msvc"25 26%rtti.TypeDescriptor2 = type { ptr, ptr, [3 x i8] }27%eh.CatchableType = type { i32, ptr, i32, i32, i32, i32, ptr }28%eh.CatchableTypeArray.1 = type { i32, [1 x ptr] }29%eh.ThrowInfo = type { i32, ptr, ptr, ptr }30 31$"\01??_R0H@8" = comdat any32 33$"_CT??_R0H@84" = comdat any34 35$_CTA1H = comdat any36 37$_TI1H = comdat any38 39@"\01??_7type_info@@6B@" = external constant ptr40@"\01??_R0H@8" = linkonce_odr global %rtti.TypeDescriptor2 { ptr @"\01??_7type_info@@6B@", ptr null, [3 x i8] c".H\00" }, comdat41@"_CT??_R0H@84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 1, ptr @"\01??_R0H@8", i32 0, i32 -1, i32 0, i32 4, ptr null }, section ".xdata", comdat42@_CTA1H = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x ptr] [ptr @"_CT??_R0H@84"] }, section ".xdata", comdat43@_TI1H = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, ptr null, ptr null, ptr @_CTA1H }, section ".xdata", comdat44 45define void @"\01?f@@YAXXZ"() #0 personality ptr @__CxxFrameHandler3 {46entry:47 %i = alloca i32, align 448 %tmp = alloca i32, align 449 %tmp1 = alloca i32, align 450 store i32 0, ptr %i, align 451 store i32 42, ptr %tmp, align 452 invoke void @_CxxThrowException(ptr %tmp, ptr @_TI1H) #153 to label %unreachable unwind label %catch.dispatch54 55catch.dispatch: ; preds = %entry56 %cs1 = catchswitch within none [label %catch] unwind label %catch.dispatch.757 58catch: ; preds = %catch.dispatch59 %0 = catchpad within %cs1 [ptr @"\01??_R0H@8", i32 0, ptr null]60 catchret from %0 to label %catchret.dest61 62catchret.dest: ; preds = %catch63 br label %try.cont64 65try.cont: ; preds = %catchret.dest66 store i32 42, ptr %tmp1, align 467 invoke void @_CxxThrowException(ptr %tmp1, ptr @_TI1H) #168 to label %unreachable unwind label %catch.dispatch.269 70catch.dispatch.2: ; preds = %try.cont71 %cs2 = catchswitch within none [label %catch.4] unwind label %catch.dispatch.772 73catch.4: ; preds = %catch.dispatch.274 %1 = catchpad within %cs2 [ptr @"\01??_R0H@8", i32 0, ptr null]75 catchret from %1 to label %catchret.dest.576 77catchret.dest.5: ; preds = %catch.478 br label %try.cont.679 80try.cont.6: ; preds = %catchret.dest.581 br label %try.cont.1182 83catch.dispatch.7:84 %cs3 = catchswitch within none [label %catch.9] unwind to caller85 86catch.9: ; preds = %catch.dispatch.787 %2 = catchpad within %cs3 [ptr @"\01??_R0H@8", i32 0, ptr null]88 catchret from %2 to label %catchret.dest.1089 90catchret.dest.10: ; preds = %catch.991 br label %try.cont.1192 93try.cont.11: ; preds = %catchret.dest.10, %try.cont.694 ret void95 96unreachable: ; preds = %try.cont, %entry97 unreachable98}99 100declare x86_stdcallcc void @_CxxThrowException(ptr, ptr)101 102declare i32 @__CxxFrameHandler3(...)103 104attributes #0 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }105attributes #1 = { noreturn }106