@@ -7626,16 +7626,16 @@ static void createAndCollectMergePhiForReduction(
7626
7626
7627
7627
DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan (
7628
7628
ElementCount BestVF, unsigned BestUF, VPlan &BestVPlan,
7629
- InnerLoopVectorizer &ILV, DominatorTree *DT, bool IsEpilogueVectorization ,
7629
+ InnerLoopVectorizer &ILV, DominatorTree *DT, bool VectorizingEpilogue ,
7630
7630
const DenseMap<const SCEV *, Value *> *ExpandedSCEVs) {
7631
7631
assert (BestVPlan.hasVF (BestVF) &&
7632
7632
" Trying to execute plan with unsupported VF" );
7633
7633
assert (BestVPlan.hasUF (BestUF) &&
7634
7634
" Trying to execute plan with unsupported UF" );
7635
7635
assert (
7636
- (IsEpilogueVectorization || !ExpandedSCEVs) &&
7636
+ ((VectorizingEpilogue && ExpandedSCEVs) ||
7637
+ (!VectorizingEpilogue && !ExpandedSCEVs)) &&
7637
7638
" expanded SCEVs to reuse can only be used during epilogue vectorization" );
7638
- (void )IsEpilogueVectorization;
7639
7639
7640
7640
// TODO: Move to VPlan transform stage once the transition to the VPlan-based
7641
7641
// cost model is complete for better cost estimates.
@@ -7661,8 +7661,8 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
7661
7661
if (!ILV.getTripCount ())
7662
7662
ILV.setTripCount (State.get (BestVPlan.getTripCount (), VPLane (0 )));
7663
7663
else
7664
- assert (IsEpilogueVectorization && " should only re-use the existing trip "
7665
- " count during epilogue vectorization" );
7664
+ assert (VectorizingEpilogue && " should only re-use the existing trip "
7665
+ " count during epilogue vectorization" );
7666
7666
7667
7667
// 1. Set up the skeleton for vectorization, including vector pre-header and
7668
7668
// middle block. The vector loop is created during VPlan execution.
@@ -7715,7 +7715,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
7715
7715
for (VPRecipeBase &R : *ExitVPBB) {
7716
7716
createAndCollectMergePhiForReduction (
7717
7717
dyn_cast<VPInstruction>(&R), State, OrigLoop,
7718
- State.CFG .VPBB2IRBB [ExitVPBB], ExpandedSCEVs );
7718
+ State.CFG .VPBB2IRBB [ExitVPBB], VectorizingEpilogue );
7719
7719
}
7720
7720
7721
7721
// 2.6. Maintain Loop Hints
@@ -10233,7 +10233,7 @@ bool LoopVectorizePass::processLoop(Loop *L) {
10233
10233
10234
10234
std::unique_ptr<VPlan> BestMainPlan (BestPlan.duplicate ());
10235
10235
auto ExpandedSCEVs = LVP.executePlan (EPI.MainLoopVF , EPI.MainLoopUF ,
10236
- *BestMainPlan, MainILV, DT, true );
10236
+ *BestMainPlan, MainILV, DT, false );
10237
10237
++LoopsVectorized;
10238
10238
10239
10239
// Second pass vectorizes the epilogue and adjusts the control flow
0 commit comments