[llvm] [IR] Add CallBr intrinsics support (PR #133907)
Robert Imschweiler via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 2 04:41:37 PDT 2025
================
@@ -134,8 +134,14 @@ class IntrinsicInst : public CallInst {
return CF->isIntrinsic();
return false;
}
+ static bool classof(const CallBase *I) {
+ if (const Function *CF = I->getCalledFunction())
+ return CF->isIntrinsic();
+ return false;
+ }
static bool classof(const Value *V) {
- return isa<CallInst>(V) && classof(cast<CallInst>(V));
+ return (isa<CallInst>(V) && classof(cast<CallInst>(V))) ||
+ (isa<CallBase>(V) && classof(cast<CallBase>(V)));
----------------
ro-i wrote:
In the current state of the code this is needed because, otherwise, converting the seldag/gisel functions to handle CallBase instead of CallInst doesn't work. (If we don't do this whole conversion, however, (see comments above) this classof adaption is no longer required, of course.)
https://github.com/llvm/llvm-project/pull/133907
More information about the llvm-commits
mailing list