|
| 1 | +; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s |
| 2 | + |
| 3 | +define amdgpu_kernel void @callee_kernel(ptr addrspace(1) %out) { |
| 4 | +entry: |
| 5 | + store volatile i32 0, ptr addrspace(1) %out |
| 6 | + ret void |
| 7 | +} |
| 8 | + |
| 9 | +define amdgpu_vs void @callee_vs(ptr addrspace(1) inreg %out) { |
| 10 | +entry: |
| 11 | + store volatile i32 0, ptr addrspace(1) %out |
| 12 | + ret void |
| 13 | +} |
| 14 | + |
| 15 | +define amdgpu_gs void @callee_gs(ptr addrspace(1) %out) { |
| 16 | +entry: |
| 17 | + store volatile i32 0, ptr addrspace(1) %out |
| 18 | + ret void |
| 19 | +} |
| 20 | + |
| 21 | +define amdgpu_ps void @callee_ps(ptr addrspace(1) %out) { |
| 22 | +entry: |
| 23 | + store volatile i32 0, ptr addrspace(1) %out |
| 24 | + ret void |
| 25 | +} |
| 26 | + |
| 27 | +define amdgpu_cs void @callee_cs(ptr addrspace(1) %out) { |
| 28 | +entry: |
| 29 | + store volatile i32 0, ptr addrspace(1) %out |
| 30 | + ret void |
| 31 | +} |
| 32 | + |
| 33 | +define amdgpu_es void @callee_es(ptr addrspace(1) %out) { |
| 34 | +entry: |
| 35 | + store volatile i32 0, ptr addrspace(1) %out |
| 36 | + ret void |
| 37 | +} |
| 38 | + |
| 39 | +define amdgpu_hs void @callee_hs(ptr addrspace(1) %out) { |
| 40 | +entry: |
| 41 | + store volatile i32 0, ptr addrspace(1) %out |
| 42 | + ret void |
| 43 | +} |
| 44 | + |
| 45 | +define amdgpu_ls void @callee_ls(ptr addrspace(1) %out) { |
| 46 | +entry: |
| 47 | + store volatile i32 0, ptr addrspace(1) %out |
| 48 | + ret void |
| 49 | +} |
| 50 | + |
| 51 | +; CHECK: Callee is not callable |
| 52 | +define amdgpu_kernel void @caller_kernel(ptr addrspace(1) %out) { |
| 53 | +entry: |
| 54 | + call amdgpu_kernel void @callee_kernel(ptr addrspace(1) %out) |
| 55 | + ret void |
| 56 | +} |
| 57 | + |
| 58 | +; CHECK: Callee is not callable |
| 59 | +define amdgpu_vs void @caller_vs(ptr addrspace(1) inreg %out) { |
| 60 | +entry: |
| 61 | + call amdgpu_vs void @callee_vs(ptr addrspace(1) %out) |
| 62 | + ret void |
| 63 | +} |
| 64 | + |
| 65 | +; CHECK: Callee is not callable |
| 66 | +define amdgpu_gs void @caller_gs(ptr addrspace(1) %out) { |
| 67 | +entry: |
| 68 | + call amdgpu_gs void @callee_gs(ptr addrspace(1) %out) |
| 69 | + ret void |
| 70 | +} |
| 71 | + |
| 72 | +; CHECK: Callee is not callable |
| 73 | +define amdgpu_ps void @caller_ps(ptr addrspace(1) %out) { |
| 74 | +entry: |
| 75 | + call amdgpu_ps void @callee_ps(ptr addrspace(1) %out) |
| 76 | + ret void |
| 77 | +} |
| 78 | + |
| 79 | +; CHECK: Callee is not callable |
| 80 | +define amdgpu_cs void @caller_cs(ptr addrspace(1) %out) { |
| 81 | +entry: |
| 82 | + call amdgpu_cs void @callee_cs(ptr addrspace(1) %out) |
| 83 | + ret void |
| 84 | +} |
| 85 | + |
| 86 | +; CHECK: Callee is not callable |
| 87 | +define amdgpu_es void @caller_es(ptr addrspace(1) %out) { |
| 88 | +entry: |
| 89 | + call amdgpu_es void @callee_es(ptr addrspace(1) %out) |
| 90 | + ret void |
| 91 | +} |
| 92 | + |
| 93 | +; CHECK: Callee is not callable |
| 94 | +define amdgpu_hs void @caller_hs(ptr addrspace(1) %out) { |
| 95 | +entry: |
| 96 | + call amdgpu_hs void @callee_hs(ptr addrspace(1) %out) |
| 97 | + ret void |
| 98 | +} |
| 99 | + |
| 100 | +; CHECK: Callee is not callable |
| 101 | +define amdgpu_ls void @caller_ls(ptr addrspace(1) %out) { |
| 102 | +entry: |
| 103 | + call amdgpu_ls void @callee_ls(ptr addrspace(1) %out) |
| 104 | + ret void |
| 105 | +} |
| 106 | + |
| 107 | +; CHECK: Callee is not callable |
| 108 | +define void @indirect_caller_kernel(ptr %func) { |
| 109 | +entry: |
| 110 | + call amdgpu_kernel void %func() |
| 111 | + ret void |
| 112 | +} |
| 113 | + |
| 114 | +; CHECK: Callee is not callable |
| 115 | +define void @indirect_caller_vs(ptr %func) { |
| 116 | +entry: |
| 117 | + call amdgpu_vs void %func() |
| 118 | + ret void |
| 119 | +} |
| 120 | + |
| 121 | +; CHECK: Callee is not callable |
| 122 | +define void @indirect_caller_gs(ptr %func) { |
| 123 | +entry: |
| 124 | + call amdgpu_gs void %func() |
| 125 | + ret void |
| 126 | +} |
| 127 | + |
| 128 | +; CHECK: Callee is not callable |
| 129 | +define void @indirect_caller_ps(ptr %func) { |
| 130 | +entry: |
| 131 | + call amdgpu_ps void %func() |
| 132 | + ret void |
| 133 | +} |
| 134 | + |
| 135 | +; CHECK: Callee is not callable |
| 136 | +define void @indirect_caller_cs(ptr %func) { |
| 137 | +entry: |
| 138 | + call amdgpu_cs void %func() |
| 139 | + ret void |
| 140 | +} |
| 141 | + |
| 142 | +; CHECK: Callee is not callable |
| 143 | +define void @indirect_caller_es(ptr %func) { |
| 144 | +entry: |
| 145 | + call amdgpu_es void %func() |
| 146 | + ret void |
| 147 | +} |
| 148 | + |
| 149 | +; CHECK: Callee is not callable |
| 150 | +define void @indirect_caller_hs(ptr %func) { |
| 151 | +entry: |
| 152 | + call amdgpu_hs void %func() |
| 153 | + ret void |
| 154 | +} |
| 155 | + |
| 156 | +; CHECK: Callee is not callable |
| 157 | +define void @indirect_caller_ls(ptr %func) { |
| 158 | +entry: |
| 159 | + call amdgpu_ls void %func() |
| 160 | + ret void |
| 161 | +} |
0 commit comments