[llvm] [IA][RISCV] Add support for vp.load/vp.store with shufflevector (PR #135445)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Wed May 7 13:30:15 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()) {
----------------
mshockwave wrote:
oh that's a good point -- we always need to convert the mask to scalable vector (after we remove unmasked intrinsics). I just found that I didn't not remove the check in the follow-up PR, I'll do that shortly.
https://github.com/llvm/llvm-project/pull/135445
More information about the llvm-commits
mailing list