[llvm] [VPlan] Explicitly handle scalar pointer inductions. (PR #83068)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 13:15:20 PDT 2024
================
@@ -538,21 +541,53 @@ static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID,
VecPreheader->appendRecipe(Step->getDefiningRecipe());
}
- VPScalarIVStepsRecipe *Steps = new VPScalarIVStepsRecipe(ID, BaseIV, Step);
+ VPScalarIVStepsRecipe *Steps = new VPScalarIVStepsRecipe(
+ BaseIV, Step, InductionOpcode,
+ FPBinOp ? FPBinOp->getFastMathFlags() : FastMathFlags());
HeaderVPBB->insert(Steps, IP);
return Steps;
}
-/// If any user of a VPWidenIntOrFpInductionRecipe needs scalar values,
-/// provide them by building scalar steps off of the canonical scalar IV and
+/// Legalize VPWidenPointer induction, by replacing it with a PtrAdd (IndStart,
+/// ScalarIVSteps (0, Step)) if only its scalar values are used. Als optimize
----------------
fhahn wrote:
Adjusted, thanks!
https://github.com/llvm/llvm-project/pull/83068
More information about the llvm-commits
mailing list