diff options
Diffstat (limited to 'llvm/test/Verifier/amdgpu-cc.ll')
-rw-r--r-- | llvm/test/Verifier/amdgpu-cc.ll | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/test/Verifier/amdgpu-cc.ll b/llvm/test/Verifier/amdgpu-cc.ll index aec0977..e86825e 100644 --- a/llvm/test/Verifier/amdgpu-cc.ll +++ b/llvm/test/Verifier/amdgpu-cc.ll @@ -217,3 +217,36 @@ define amdgpu_cs_chain_preserve void @preallocated_cc_amdgpu_cs_chain_preserve(p define amdgpu_cs_chain_preserve void @inalloca_cc_amdgpu_cs_chain_preserve(ptr inalloca(i32) %ptr) { ret void } + +; CHECK: Calling convention requires first argument to be i1 +; CHECK-NEXT: ptr @whole_wave_no_args +define amdgpu_gfx_whole_wave void @whole_wave_no_args() { + ret void +} + +; CHECK: Calling convention requires first argument to be i1 +; CHECK-NEXT: ptr @whole_wave_must_have_i1_active +define amdgpu_gfx_whole_wave void @whole_wave_must_have_i1_active(i32 %x) { + ret void +} + +; CHECK: Calling convention requires first argument to not be inreg +; CHECK-NEXT: ptr @whole_wave_i1_active_inreg +define amdgpu_gfx_whole_wave void @whole_wave_i1_active_inreg(i1 inreg %active) { + ret void +} + +; CHECK: Calling convention does not support varargs +; CHECK-NEXT: ptr @whole_wave_varargs +define amdgpu_gfx_whole_wave void @whole_wave_varargs(i1 %active, i32 %x, ...) { + ret void +} + +declare amdgpu_gfx_whole_wave void @whole_wave_callee(i1 %active) + +; CHECK: calling convention does not permit calls +; CHECK-NEXT: call amdgpu_gfx_whole_wave void @whole_wave_callee(i1 true) +define amdgpu_cs void @cant_call_whole_wave_func() { + call amdgpu_gfx_whole_wave void @whole_wave_callee(i1 true) + ret void +} |