[llvm] [LLVM][Verifier] Move intrinsic signature verification to declarations (PR #204478)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 07:20:24 PDT 2026
================
@@ -5883,31 +5911,6 @@ void Verifier::visitInstruction(Instruction &I) {
/// Allow intrinsics to be verified in different ways.
void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
Function *IF = Call.getCalledFunction();
- Check(IF->isDeclaration(), "Intrinsic functions should never be defined!",
- IF);
----------------
jurahul wrote:
No, we have a similar check in `visitFunction`:
```
// Verify that this function (which has a body) is not named "llvm.*". It
// is not legal to define intrinsics.
Check(!IsIntrinsic, "llvm intrinsics cannot be defined!", &F);
```
https://github.com/llvm/llvm-project/pull/204478
More information about the llvm-commits
mailing list