1 ; RUN: llc -mtriple=x86_64-windows-msvc < %s | FileCheck %s
3 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-pc-windows-msvc"
6 %eh.ThrowInfo = type { i32, i32, i32, i32 }
8 define void @test1(i1 %B) personality i32 (...)* @__CxxFrameHandler3 {
11 to label %unreachable unwind label %catch.dispatch
14 %cp = catchpad [i8* null, i32 64, i8* null]
15 to label %catch unwind label %catchendblock
18 br i1 %B, label %catchret, label %catch
21 catchret %cp to label %try.cont
27 catchendpad unwind to caller
35 ; The entry funclet contains %entry and %try.cont
40 ; The catch funclet contains %catch and %catchret
48 define i32 @test2(i1 %B) personality i32 (...)* @__CxxFrameHandler3 {
50 invoke void @_CxxThrowException(i8* null, %eh.ThrowInfo* null) #1
51 to label %unreachable unwind label %catch.dispatch
53 catch.dispatch: ; preds = %entry
54 %0 = catchpad [i8* null, i32 64, i8* null]
55 to label %catch unwind label %catchendblock
57 catch: ; preds = %catch.dispatch
58 invoke void @_CxxThrowException(i8* null, %eh.ThrowInfo* null) #1
59 to label %unreachable unwind label %catch.dispatch.1
61 catch.dispatch.1: ; preds = %catch
62 %1 = catchpad [i8* null, i32 64, i8* null]
63 to label %catch.3 unwind label %catchendblock.2
65 catch.3: ; preds = %catch.dispatch.1
66 catchret %1 to label %try.cont
68 try.cont: ; preds = %catch.3
69 catchret %0 to label %try.cont.5
71 try.cont.5: ; preds = %try.cont
74 catchendblock.2: ; preds = %catch.dispatch.1
75 catchendpad unwind label %catchendblock
77 catchendblock: ; preds = %catchendblock.2, %catch.dispatch
78 catchendpad unwind to caller
80 unreachable: ; preds = %catch, %entry
87 ; The entry funclet contains %entry and %try.cont.5
89 ; CHECK: # %try.cont.5
92 ; The inner catch funclet contains %catch.3
96 ; The outer catch funclet contains %catch and %try.cont
101 declare void @_CxxThrowException(i8*, %eh.ThrowInfo*)
102 declare i32 @__CxxFrameHandler3(...)