[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
Thu May 1 18:45:24 PDT 2025
================
@@ -23929,26 +24008,20 @@ bool RISCVTargetLowering::lowerDeinterleavedIntrinsicToVPLoad(
const unsigned Factor = DeinterleaveResults.size();
- auto *WideVTy = dyn_cast<ScalableVectorType>(Load->getType());
- // TODO: Support fixed vectors.
- if (!WideVTy)
+ auto *VTy = dyn_cast<VectorType>(DeinterleaveResults[0]->getType());
+ if (!VTy)
return false;
- unsigned WideNumElements = WideVTy->getElementCount().getKnownMinValue();
- assert(WideNumElements % Factor == 0 &&
- "ElementCount of a wide load must be divisible by interleave factor");
- auto *VTy =
- VectorType::get(WideVTy->getScalarType(), WideNumElements / Factor,
- WideVTy->isScalableTy());
----------------
mshockwave wrote:
the loaded type could be wider than `VTy * Factor` so I think this assertion no longer holds. Plus, we're not deriving `VTy` from `WideVTy` like the deleted code shown here, but retrieving it from `DeinterleaveResults`, whose types have already been validated.
https://github.com/llvm/llvm-project/pull/135445
More information about the llvm-commits
mailing list