xref: /llvm-project/llvm/test/CodeGen/WinEH/wineh-musttail-call.ll (revision 1d070988d9172965dee227e5629fa886845b815f)
1; RUN: llc < %s | FileCheck %s
2
3target triple = "i386-pc-windows-msvc"
4
5; Check that codegen doesn't fail due to wineh inserting instructions between
6; the musttail call and return instruction.
7
8
9define void @test() personality ptr @__CxxFrameHandler3 {
10; CHECK-LABEL: test:
11
12entry:
13  invoke void @foo() to label %try.cont unwind label %catch.dispatch
14
15catch.dispatch:
16  %0 = catchswitch within none [label %catch] unwind to caller
17
18catch:
19  %1 = catchpad within %0 [ptr null, i32 64, ptr null]
20  catchret from %1 to label %try.cont
21
22try.cont:
23; CHECK: movl %{{[a-z0-9]+}}, %fs:0
24; CHECK: jmp _bar
25
26  musttail call void @bar()
27  ret void
28}
29
30declare i32 @__CxxFrameHandler3(...)
31declare void @foo()
32declare void @bar()
33