[Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment
[llvm-core.git] / test / CodeGen / X86 / catchret-empty-fallthrough.ll
blobef8caf36a68c6c6b14e0e02ed291094bcd0cbff3
1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
3 ; BranchFolding used to remove our empty landingpad block, which is
4 ; undesirable.
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(...)
11 declare void @bar()
13 define void @foo(i1 %cond) personality i32 (...)* @__C_specific_handler {
14 entry:
15   br i1 %cond, label %return, label %try
17 try:                                              ; preds = %entry
18   invoke void @bar()
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 [i8* null]
26   catchret from %0 to label %return
28 fallthrough:                                      ; preds = %try
29   unreachable
31 return:                                           ; preds = %catch, %entry
32   ret void
35 ; CHECK-LABEL: foo: # @foo
36 ; CHECK: testb $1, %cl
37 ; CHECK: je .LBB0_[[try:[0-9]+]]
38 ; CHECK: .LBB0_[[return:[0-9]+]]:
39 ; CHECK: retq
40 ; CHECK: .LBB0_[[try]]:
41 ; CHECK: .Ltmp0:
42 ; CHECK: callq bar
43 ; CHECK: .Ltmp1:
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+1
51 ; CHECK-NEXT: .long   .Ltmp1@IMGREL+1
52 ; CHECK-NEXT: .long   1
53 ; CHECK-NEXT: .long   .LBB0_[[catch]]@IMGREL