[llvm] [AMDGPU][Verifier] Mark calls to entry functions as invalid in the IR verifier (PR #134910)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 11 12:02:36 PDT 2025
================
@@ -3598,14 +3598,8 @@ void Verifier::visitCallBase(CallBase &Call) {
Check(Callee->getValueType() == FTy,
"Intrinsic called with incompatible signature", Call);
- // Disallow calls to functions with the amdgpu_cs_chain[_preserve] calling
- // convention.
- auto CC = Call.getCallingConv();
- Check(CC != CallingConv::AMDGPU_CS_Chain &&
- CC != CallingConv::AMDGPU_CS_ChainPreserve,
- "Direct calls to amdgpu_cs_chain/amdgpu_cs_chain_preserve functions "
- "not allowed. Please use the @llvm.amdgpu.cs.chain intrinsic instead.",
- Call);
+ // Verify if the calling convention of the callee is callable.
+ Check(isCallableCC(Call.getCallingConv()), "Callee is not callable", Call);
----------------
arsenm wrote:
It's not great, but the verifier errors are less user facing than most things
https://github.com/llvm/llvm-project/pull/134910
More information about the llvm-commits
mailing list