1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
3 ; BranchFolding used to remove our empty landingpad block, which is
6 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
7 target triple = "x86_64-pc-windows-msvc18.0.0"
9 declare i32 @__C_specific_handler(...)
13 define void @foo(i1 %cond) personality ptr @__C_specific_handler {
15 br i1 %cond, label %return, label %try
19 to label %fallthrough unwind label %dispatch
21 dispatch: ; preds = %try
22 %cs1 = catchswitch within none [label %catch] unwind to caller
24 catch: ; preds = %dispatch
25 %0 = catchpad within %cs1 [ptr null]
26 catchret from %0 to label %return
28 fallthrough: ; preds = %try
31 return: ; preds = %catch, %entry
35 ; CHECK-LABEL: foo: # @foo
36 ; CHECK: testb $1, %cl
37 ; CHECK: je .LBB0_[[try:[0-9]+]]
38 ; CHECK: .LBB0_[[return:[0-9]+]]:
40 ; CHECK: .LBB0_[[try]]:
44 ; CHECK: .LBB0_[[catch:[0-9]+]]:
46 ; CHECK: .seh_handlerdata
47 ; CHECK-NEXT: .set .Lfoo$parent_frame_offset, 32
48 ; CHECK-NEXT: .long (.Llsda_end0-.Llsda_begin0)/16
49 ; CHECK-NEXT: .Llsda_begin0:
50 ; CHECK-NEXT: .long .Ltmp0@IMGREL
51 ; CHECK-NEXT: .long .Ltmp1@IMGREL+1
53 ; CHECK-NEXT: .long .LBB0_[[catch]]@IMGREL