Skip to content

Commit e0208f1

Browse files
committed
Merge rules together.
1 parent 66070f4 commit e0208f1

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)