File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -3632,21 +3632,12 @@ void Verifier::visitCallBase(CallBase &Call) {
36323632 Check (Callee->getValueType () == FTy,
36333633 " Intrinsic called with incompatible signature" , Call);
36343634
3635- // Verify if the calling convention of the callee is callable.
3636- Check (isCallableCC (Call.getCallingConv ()),
3637- " calling convention does not permit calls" , Call);
3638-
36393635 // Find the actual CC of the callee from the Module.
36403636 CallingConv::ID CalleeCC = Call.getParent ()->getParent ()->getParent ()
36413637 ->getFunction (Call.getCalledFunction ()->getName ())->getCallingConv ();
3642- // Verify that a kernel does not call another kernel.
3643- if (CalleeCC == CallingConv::AMDGPU_KERNEL ||
3644- CalleeCC == CallingConv::SPIR_KERNEL) {
3645- CallingConv::ID CallerCC = Call.getParent ()->getParent ()->getCallingConv ();
3646- Check (CallerCC != CallingConv::AMDGPU_KERNEL &&
3647- CallerCC != CallingConv::SPIR_KERNEL,
3648- " a kernel may not call a kernel" , Call.getParent ()->getParent ());
3649- }
3638+ // Verify if the calling convention of the callee is callable.
3639+ Check (isCallableCC (CalleeCC),
3640+ " calling convention does not permit calls" , Call);
36503641
36513642 // Disallow passing/returning values with alignment higher than we can
36523643 // represent.
Original file line number Diff line number Diff line change 1- ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
1+ ; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s
22
33define amdgpu_kernel void @kernel (ptr addrspace (1 ) %out , i32 %n ) {
44entry:
5- ; CHECK: a kernel may not call a kernel
6- ; CHECK-NEXT: ptr @kernel
5+ ; CHECK: calling convention does not permit calls
6+ ; CHECK-NEXT: call void @kernel(ptr addrspace(1) %out, i32 %n)
77 call void @kernel (ptr addrspace (1 ) %out , i32 %n )
88 ret void
99}
You can’t perform that action at this time.
0 commit comments