Skip to content

Commit 0c92679

Browse files
committed
Address comments
1 parent f3ffd6a commit 0c92679

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8887,14 +8887,14 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(
88878887
// Update wide induction increments to use the same step as the corresponding
88888888
// wide induction. This enables detecting induction increments directly in
88898889
// VPlan and removes redundant splats.
8890-
DenseMap<VPValue *, VPWidenInductionRecipe *> MapIVs;
8890+
SmallDenseMap<VPValue *, VPWidenInductionRecipe *> MapIVs;
88918891
for (const auto &[Phi, ID] : Legal->getInductionVars()) {
88928892
auto *IVInc = cast<Instruction>(
88938893
Phi->getIncomingValueForBlock(OrigLoop->getLoopLatch()));
88948894
VPWidenInductionRecipe *WideIV =
88958895
cast<VPWidenInductionRecipe>(RecipeBuilder.getRecipe(Phi));
88968896
VPValue *V = RecipeBuilder.getVPValueOrAddLiveIn(IVInc);
8897-
if (!dyn_cast<PHINode>(IVInc))
8897+
if (!isa<PHINode>(IVInc))
88988898
MapIVs[V] = WideIV;
88998899
if (IVInc->getOperand(0) != Phi || IVInc->getOpcode() != Instruction::Add)
89008900
continue;

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ static VPValue *optimizeEarlyExitInductionUser(VPlan &Plan,
826826
static VPValue *optimizeLatchExitInductionUser(
827827
VPlan &Plan, VPTypeAnalysis &TypeInfo, VPBlockBase *PredVPBB, VPValue *Op,
828828
DenseMap<VPValue *, VPValue *> &EndValues,
829-
DenseMap<VPValue *, VPWidenInductionRecipe *> MapIVs) {
829+
DenseMap<VPValue *, VPWidenInductionRecipe *> &MapIVs) {
830830
using namespace VPlanPatternMatch;
831831

832832
VPValue *Incoming;

0 commit comments

Comments
 (0)