[llvm] [VPlan] Use pointer index type for stride in convertToStridedAccesses (PR #199647)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 1 02:07:56 PDT 2026
================
@@ -7030,13 +7031,20 @@ void VPlanTransforms::convertToStridedAccesses(VPlan &Plan,
VPBuilder Builder(LoadR);
// Create the base pointer of strided access.
+ // TODO: reuse VPDerivedIVRecipe for base pointer computation when it
+ // supports a general VPValue as the start value.
VPValue *StartVPV = vputils::getOrCreateVPValueForSCEVExpr(Plan, Start);
- VPValue *StrideInBytes =
- Plan.getConstantInt(VectorLoop->getCanonicalIVType(),
- Step->getSExtValue(), /*IsSigned=*/true);
+ VPValue *StrideInBytes = Plan.getOrAddLiveIn(Step->getValue());
+ Type *StrideTy = TypeInfo.inferScalarType(StrideInBytes);
----------------
Mel-Chen wrote:
befea7a22fb162f8068503d51cec875a9d0893fe
Use index type directly.
https://github.com/llvm/llvm-project/pull/199647
More information about the llvm-commits
mailing list