xref: /llvm-project/llvm/test/CodeGen/X86/inconsistent_landingpad.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: not llvm-as -disable-output < %s 2>&1 | FileCheck %s
2
3define void @test() personality ptr @dummy_personality {
4; CHECK: The landingpad instruction should have a consistent result type inside a function
5entry:
6  invoke void @dummy1()
7          to label %next unwind label %unwind1
8
9unwind1:
10  %lp1 = landingpad token
11            cleanup
12  br label %return
13
14next:
15  invoke void @dummy2()
16          to label %return unwind label %unwind2
17
18unwind2:
19  %lp2 = landingpad { ptr, i32 }
20            cleanup
21  br label %return
22
23return:
24  ret void
25}
26
27declare void @dummy1()
28declare void @dummy2()
29
30declare i32 @dummy_personality(...)
31