Skip to content

Commit a4843b5

Browse files
committed
!fixup address latest comments, thanks!
1 parent 9499aaa commit a4843b5

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7729,9 +7729,9 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
77297729
dyn_cast<VPRegionBlock>(BestVPlan.getEntry()->getSingleSuccessor())) {
77307730
VPBasicBlock *HeaderVPBB = R->getEntryBasicBlock();
77317731
Loop *L = LI->getLoopFor(State.CFG.VPBB2IRBB[HeaderVPBB]);
7732-
if (VectorizedLoopID)
7732+
if (VectorizedLoopID) {
77337733
L->setLoopID(*VectorizedLoopID);
7734-
else {
7734+
} else {
77357735
// Keep all loop hints from the original loop on the vector loop (we'll
77367736
// replace the vectorizer-specific hints below).
77377737
if (MDNode *LID = OrigLoop->getLoopID())

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,7 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
694694

695695
SmallVector<VPValue *> PossiblyDead(Term->operands());
696696
Term->eraseFromParent();
697-
VPBasicBlock *Header =
698-
cast<VPBasicBlock>(Plan.getVectorLoopRegion()->getEntry());
697+
auto *Header = cast<VPBasicBlock>(Plan.getVectorLoopRegion()->getEntry());
699698
if (all_of(Header->phis(), [](VPRecipeBase &R) {
700699
return !isa<VPWidenIntOrFpInductionRecipe, VPReductionPHIRecipe>(&R);
701700
})) {
@@ -706,7 +705,7 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
706705
}
707706

708707
VPBlockBase *Preheader = Plan.getVectorLoopRegion()->getSinglePredecessor();
709-
VPBasicBlock *Exiting =
708+
auto *Exiting =
710709
cast<VPBasicBlock>(Plan.getVectorLoopRegion()->getExiting());
711710

712711
auto *LoopRegion = Plan.getVectorLoopRegion();
@@ -741,7 +740,7 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
741740
}
742741

743742
/// Sink users of \p FOR after the recipe defining the previous value \p
744-
// Previous of the recurrence. \returns true if all users of \p FOR could be
743+
/// Previous of the recurrence. \returns true if all users of \p FOR could be
745744
/// re-arranged as needed or false if it is not possible.
746745
static bool
747746
sinkRecurrenceUsersAfterPrevious(VPFirstOrderRecurrencePHIRecipe *FOR,

0 commit comments

Comments
 (0)