[llvm] [RISCV] Add codegen support for ri.vinsert.v.x and ri.vextract.x.v (PR #136708)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 24 07:19:57 PDT 2025
================
@@ -9576,6 +9576,13 @@ getSmallestVTForIndex(MVT VecVT, unsigned MaxIdx, SDLoc DL, SelectionDAG &DAG,
return SmallerVT;
}
+static bool isValidInsertExtractIndex(SDValue Idx) {
+ auto *IdxC = dyn_cast<ConstantSDNode>(Idx);
+ if (!IdxC || isNullConstant(Idx))
+ return false;
+ return IdxC->getZExtValue() < 32;
----------------
lukel97 wrote:
Nit
```suggestion
return isUInt<5>(IdxC->getZExtValue());
```
https://github.com/llvm/llvm-project/pull/136708
More information about the llvm-commits
mailing list