xref: /llvm-project/llvm/test/Assembler/call-arg-is-callee.ll (revision 75a479221b72c8b4827470485949cebf67d1c967)
1; RUN: llvm-as < %s -disable-output 2>&1 | FileCheck %s -allow-empty
2; CHECK-NOT: error
3; CHECK-NOT: warning
4; RUN: verify-uselistorder < %s
5
6; Check ordering of callee operand versus the argument operand.
7define void @call(ptr %p) {
8  call void (...) %p(ptr %p)
9  ret void
10}
11
12; Check ordering of callee operand versus the argument operand.
13declare void @personality(ptr)
14define void @invoke(ptr %p) personality ptr @personality {
15entry:
16  invoke void (...) %p(ptr %p)
17  to label %normal unwind label %exception
18normal:
19  ret void
20exception:
21  landingpad { ptr, i32 } cleanup
22  ret void
23}
24
25; Check order for callbr instruction. Cannot reuse labels in the test since the
26; verifier prevents duplicating callbr destinations.
27define void @callbr() {
28entry:
29  callbr i32 asm "", "=r,r,!i,!i"(i32 0)
30              to label %one [label %two, label %three]
31one:
32  ret void
33two:
34  ret void
35three:
36  ret void
37}
38