[llvm] [IA][RISCV] Add support for vp.load/vp.store with shufflevector (PR #135445)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed May 7 02:27:24 PDT 2025


================
@@ -10585,7 +10610,19 @@ SDValue RISCVTargetLowering::LowerINTRINSIC_W_CHAIN(SDValue Op,
                   ContainerVT.getScalarSizeInBits();
     EVT VecTupTy = MVT::getRISCVVectorTupleVT(Sz, NF);
 
-    SDValue VL = DAG.getConstant(VT.getVectorNumElements(), DL, XLenVT);
+    // Masked: (pointer, mask, vl)
+    // Non-masked: (pointer, vl)
+    bool IsMasked = Op.getNumOperands() > 4;
+    SDValue VL = Op.getOperand(Op.getNumOperands() - 1);
+    SDValue Mask =
+        IsMasked ? Op.getOperand(3) : getAllOnesMask(ContainerVT, VL, DL, DAG);
+    MVT MaskVT = Mask.getSimpleValueType();
+    if (MaskVT.isFixedLengthVector()) {
----------------
lukel97 wrote:

Just checking, if we remove the unmasked intrinsics in the follow up PR we won't need this check for `MaskVT.isFixedLengthVector()`, because we won't have getAllOnesMask anymore?

https://github.com/llvm/llvm-project/pull/135445


More information about the llvm-commits mailing list