66 lines · plain
1; RUN: llc < %s | FileCheck %s2target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"3target triple = "x86_64-pc-windows-msvc"4 5declare void @rt_init()6 7declare i32 @__CxxFrameHandler3(...)8 9define void @test1(ptr %fp, i64 %n) personality ptr @__CxxFrameHandler3 {10entry:11 %t.i = alloca ptr12 %t.ii = alloca i813 %.alloca8 = alloca i8, i64 %n14 store volatile i8 0, ptr %t.ii15 store volatile i8 0, ptr %.alloca816 invoke void @rt_init()17 to label %try.cont unwind label %catch.switch18 19try.cont:20 invoke void %fp()21 to label %exit unwind label %catch.switch22 23exit:24 ret void25 26catch.pad:27 %cp = catchpad within %cs [ptr null, i32 0, ptr %t.i]28 catchret from %cp to label %exit29 30catch.switch:31 %cs = catchswitch within none [label %catch.pad] unwind to caller32}33 34; CHECK-LABEL: $handlerMap$0$test1:35; CHECK: .long 036; CHECK-NEXT: .long 037; CHECK-NEXT: .long 1638 39define void @test2(ptr %fp, i64 %n) personality ptr @__CxxFrameHandler3 {40entry:41 %t.i = alloca i12842 %.alloca8 = alloca i8, i64 %n43 store volatile i8 0, ptr %.alloca844 invoke void @rt_init()45 to label %try.cont unwind label %catch.switch46 47try.cont:48 invoke void %fp()49 to label %exit unwind label %catch.switch50 51exit:52 ret void53 54catch.pad:55 %cp = catchpad within %cs [ptr null, i32 0, ptr %t.i]56 catchret from %cp to label %exit57 58catch.switch:59 %cs = catchswitch within none [label %catch.pad] unwind to caller60}61 62; CHECK-LABEL: $handlerMap$0$test2:63; CHECK: .long 064; CHECK-NEXT: .long 065; CHECK-NEXT: .long 1666