[llvm] [RISCV][GISel] Fallback to SelectionDAG for RVV tuple intrinsics. (PR #162133)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 12:05:10 PDT 2025
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/162133
These intrinsics currently crash in translateCall.
>From a2356d1e8326e17b0e445017f25be205c82f85a5 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Mon, 6 Oct 2025 12:02:41 -0700
Subject: [PATCH] [RISCV][GISel] Fallback to SelectionDAG for RVV tuple
intrinsics.
---
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index dcce2d29a7042..efbc103642993 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -25031,8 +25031,17 @@ bool RISCVTargetLowering::fallBackToDAGISel(const Instruction &Inst) const {
if (auto *II = dyn_cast<IntrinsicInst>(&Inst)) {
// Mark RVV intrinsic as supported.
- if (RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(II->getIntrinsicID()))
+ if (RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(II->getIntrinsicID())) {
+ // GISel doesn't support tuple types yet.
+ if (Inst.getType()->isRISCVVectorTupleTy())
+ return true;
+
+ for (unsigned i = 0; i < II->arg_size(); ++i)
+ if (II->getArgOperand(i)->getType()->isRISCVVectorTupleTy())
+ return true;
+
return false;
+ }
}
if (Inst.getType()->isScalableTy())
More information about the llvm-commits
mailing list