43 lines · plain
1; RUN: llc -verify-machineinstrs < %s | FileCheck %s2 3; We used to have an issue where we inserted an MBB between invoke.cont.3 and4; its fallthrough target of ret void.5 6target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"7target triple = "i386-pc-windows-msvc18.0.0"8 9@some_global = global i32 010 11declare i32 @__CxxFrameHandler3(...)12 13declare void @g()14 15define void @f() personality ptr @__CxxFrameHandler3 {16entry:17 invoke void @g()18 to label %invoke.cont.3 unwind label %catch.dispatch19 20catch.dispatch: ; preds = %entry21 %cs1 = catchswitch within none [label %catch] unwind to caller22 23catch: ; preds = %catch.dispatch24 %0 = catchpad within %cs1 [ptr null, i32 64, ptr null]25 catchret from %0 to label %nrvo.skipdtor26 27invoke.cont.3: ; preds = %entry28 store i32 123, ptr @some_global29 br label %nrvo.skipdtor30 31nrvo.skipdtor: ; preds = %invoke.cont.3, %invoke.cont.432 ret void33}34 35; CHECK-LABEL: _f: # @f36; CHECK: calll _g37; CHECK: movl $123, _some_global38; CHECK-NOT: jmp39; CHECK-NOT: movl {{.*}}, %esp40; CHECK: retl41; CHECK: addl $12, %ebp42; CHECK: jmp LBB0_{{.*}}43