@@ -4910,7 +4910,6 @@ LoopVectorizationPlanner::selectInterleaveCount(VPlan &Plan, ElementCount VF,
4910
4910
any_of (Plan.getVectorLoopRegion ()->getEntryBasicBlock ()->phis (),
4911
4911
[](VPRecipeBase &R) {
4912
4912
auto *RedR = dyn_cast<VPReductionPHIRecipe>(&R);
4913
-
4914
4913
return RedR && (RecurrenceDescriptor::isAnyOfRecurrenceKind (
4915
4914
RedR->getRecurrenceKind ()) ||
4916
4915
RecurrenceDescriptor::isFindIVRecurrenceKind (
@@ -10156,9 +10155,6 @@ bool LoopVectorizePass::processLoop(Loop *L) {
10156
10155
10157
10156
GeneratedRTChecks Checks (PSE, DT, LI, TTI, F->getDataLayout (), CM.CostKind );
10158
10157
if (LVP.hasPlanWithVF (VF.Width )) {
10159
- VPCostContext CostCtx (CM.TTI , *CM.TLI , CM.Legal ->getWidestInductionType (),
10160
- CM, CM.CostKind );
10161
-
10162
10158
// Select the interleave count.
10163
10159
IC = LVP.selectInterleaveCount (LVP.getPlanFor (VF.Width ), VF.Width , VF.Cost );
10164
10160
@@ -10182,6 +10178,8 @@ bool LoopVectorizePass::processLoop(Loop *L) {
10182
10178
// Check if it is profitable to vectorize with runtime checks.
10183
10179
bool ForceVectorization =
10184
10180
Hints.getForce () == LoopVectorizeHints::FK_Enabled;
10181
+ VPCostContext CostCtx (CM.TTI , *CM.TLI , CM.Legal ->getWidestInductionType (),
10182
+ CM, CM.CostKind );
10185
10183
if (!ForceVectorization &&
10186
10184
!isOutsideLoopWorkProfitable (Checks, VF, L, PSE, CostCtx,
10187
10185
LVP.getPlanFor (VF.Width ), SEL,
0 commit comments