1 ; RUN: not opt -passes=verify %s 2>&1 | FileCheck %s
3 declare tailcc void @simple()
5 define tailcc void @inreg(ptr inreg) {
6 ; CHECK: inreg attribute not allowed in tailcc musttail caller
7 musttail call tailcc void @simple()
11 define tailcc void @inalloca(ptr inalloca(i8)) {
12 ; CHECK: inalloca attribute not allowed in tailcc musttail caller
13 musttail call tailcc void @simple()
17 define tailcc void @swifterror(ptr swifterror) {
18 ; CHECK: swifterror attribute not allowed in tailcc musttail caller
19 musttail call tailcc void @simple()
23 define tailcc void @preallocated(ptr preallocated(i8)) {
24 ; CHECK: preallocated attribute not allowed in tailcc musttail caller
25 musttail call tailcc void @simple()
29 define tailcc void @byref(ptr byref(i8)) {
30 ; CHECK: byref attribute not allowed in tailcc musttail caller
31 musttail call tailcc void @simple()
35 define tailcc void @call_inreg() {
36 ; CHECK: inreg attribute not allowed in tailcc musttail callee
37 musttail call tailcc void @inreg(ptr inreg undef)
41 define tailcc void @call_inalloca() {
42 ; CHECK: inalloca attribute not allowed in tailcc musttail callee
43 musttail call tailcc void @inalloca(ptr inalloca(i8) undef)
47 define tailcc void @call_swifterror() {
48 ; CHECK: swifterror attribute not allowed in tailcc musttail callee
49 %err = alloca swifterror ptr
50 musttail call tailcc void @swifterror(ptr swifterror %err)
54 define tailcc void @call_preallocated() {
55 ; CHECK: preallocated attribute not allowed in tailcc musttail callee
56 musttail call tailcc void @preallocated(ptr preallocated(i8) undef)
60 define tailcc void @call_byref() {
61 ; CHECK: byref attribute not allowed in tailcc musttail callee
62 musttail call tailcc void @byref(ptr byref(i8) undef)
67 declare tailcc void @varargs(...)
68 define tailcc void @call_varargs(...) {
69 ; CHECK: cannot guarantee tailcc tail call for varargs function
70 musttail call tailcc void(...) @varargs(...)