1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
3 ; We used to have an issue where we inserted an MBB between invoke.cont.3 and
4 ; its fallthrough target of ret void.
6 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
7 target triple = "i386-pc-windows-msvc18.0.0"
9 @some_global = global i32 0
11 declare i32 @__CxxFrameHandler3(...)
15 define void @f() personality i32 (...)* @__CxxFrameHandler3 {
18 to label %invoke.cont.3 unwind label %catch.dispatch
20 catch.dispatch: ; preds = %entry
21 %cs1 = catchswitch within none [label %catch] unwind to caller
23 catch: ; preds = %catch.dispatch
24 %0 = catchpad within %cs1 [i8* null, i32 64, i8* null]
25 catchret from %0 to label %nrvo.skipdtor
27 invoke.cont.3: ; preds = %entry
28 store i32 123, i32* @some_global
29 br label %nrvo.skipdtor
31 nrvo.skipdtor: ; preds = %invoke.cont.3, %invoke.cont.4
35 ; CHECK-LABEL: _f: # @f
37 ; CHECK: movl $123, _some_global
39 ; CHECK-NOT: movl {{.*}}, %esp
41 ; CHECK: addl $12, %ebp
42 ; CHECK: jmp LBB0_{{.*}}