[llvm] df357a7 - [VPlan] Use step from induction recipe directly. (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 11 13:40:26 PDT 2023
Author: Florian Hahn
Date: 2023-06-11T21:40:06+01:00
New Revision: df357a71dd7d10ee4bdc0bd22e6be048c5ad7088
URL: https://github.com/llvm/llvm-project/commit/df357a71dd7d10ee4bdc0bd22e6be048c5ad7088
DIFF: https://github.com/llvm/llvm-project/commit/df357a71dd7d10ee4bdc0bd22e6be048c5ad7088.diff
LOG: [VPlan] Use step from induction recipe directly. (NFC)
Directly use the step of the transformed induction instead of creating
a new step. This allows replacing all uses of strides in D147783.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index ea8f483aed79c..2047de281c6c7 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -507,8 +507,7 @@ void VPlanTransforms::optimizeInductions(VPlan &Plan, ScalarEvolution &SE) {
if (Instruction *TruncI = WideIV->getTruncInst())
ResultTy = TruncI->getType();
const InductionDescriptor &ID = WideIV->getInductionDescriptor();
- VPValue *Step =
- vputils::getOrCreateVPValueForSCEVExpr(Plan, ID.getStep(), SE);
+ VPValue *Step = WideIV->getStepValue();
VPValue *BaseIV = CanonicalIV;
if (!CanonicalIV->isCanonical(ID.getKind(), WideIV->getStartValue(), Step,
ResultTy)) {
More information about the llvm-commits
mailing list