blob: 18682fb690ee2c59fa16e9028701575048366932 [file] [log] [blame]
David Majnemere35244c2015-11-08 02:36:00 +00001; RUN: llc < %s | FileCheck %s
2target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
3target triple = "i686-pc-windows-msvc18.0.0"
4
5define void @f() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
6entry:
7 invoke void @g()
8 to label %try.cont unwind label %catch.dispatch
9
10catch.dispatch: ; preds = %entry
11 %0 = catchpad [i8* null, i32 64, i8* null]
12 to label %catch unwind label %catchendblock
13
14catch: ; preds = %catch.dispatch
15 catchret %0 to label %try.cont
16
17try.cont: ; preds = %entry, %catch
18 %b.0 = phi i1 [ false, %catch ], [ true, %entry ]
19 tail call void @h(i1 zeroext %b.0)
20 ret void
21
22catchendblock: ; preds = %catch.dispatch
23 catchendpad unwind to caller
24}
25
26; CHECK-LABEL: _f:
27; CHECK: calll _g
28; CHECK: calll _h
29
30declare void @g()
31
32declare i32 @__CxxFrameHandler3(...)
33
34declare void @h(i1 zeroext)