[llvm] [RISCV][GISel] Add initial support for rvv intrinsics (PR #156415)
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 06:46:17 PDT 2025
================
@@ -24700,6 +24700,18 @@ bool RISCVTargetLowering::fallBackToDAGISel(const Instruction &Inst) const {
Op == Instruction::Freeze || Op == Instruction::Store)
return false;
+ if (Op == Instruction::Call) {
+ const CallInst &CI = cast<CallInst>(Inst);
+ const Function *F = CI.getCalledFunction();
+ Intrinsic::ID ID = F ? F->getIntrinsicID() : Intrinsic::not_intrinsic;
+
+ const RISCVVIntrinsicsTable::RISCVVIntrinsicInfo *II =
+ RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(ID);
+ // Mark RVV intrinsic is supported.
+ if (II)
+ return false;
+ }
----------------
jroelofs wrote:
```suggestion
if (auto *II = dyn_cast<IntrinsicInst>(&Inst)) {
// Mark RVV intrinsic as supported.
if (RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(II->getIntrinsicID()))
return false;
}
```
https://github.com/llvm/llvm-project/pull/156415
More information about the llvm-commits
mailing list