@@ -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 (
@@ -10149,9 +10148,6 @@ bool LoopVectorizePass::processLoop(Loop *L) {
10149
10148
10150
10149
GeneratedRTChecks Checks (PSE, DT, LI, TTI, F->getDataLayout (), CM.CostKind );
10151
10150
if (LVP.hasPlanWithVF (VF.Width )) {
10152
- VPCostContext CostCtx (CM.TTI , *CM.TLI , CM.Legal ->getWidestInductionType (),
10153
- CM, CM.CostKind );
10154
-
10155
10151
// Select the interleave count.
10156
10152
IC = LVP.selectInterleaveCount (LVP.getPlanFor (VF.Width ), VF.Width , VF.Cost );
10157
10153
@@ -10175,6 +10171,8 @@ bool LoopVectorizePass::processLoop(Loop *L) {
10175
10171
// Check if it is profitable to vectorize with runtime checks.
10176
10172
bool ForceVectorization =
10177
10173
Hints.getForce () == LoopVectorizeHints::FK_Enabled;
10174
+ VPCostContext CostCtx (CM.TTI , *CM.TLI , CM.Legal ->getWidestInductionType (),
10175
+ CM, CM.CostKind );
10178
10176
if (!ForceVectorization &&
10179
10177
!isOutsideLoopWorkProfitable (Checks, VF, L, PSE, CostCtx,
10180
10178
LVP.getPlanFor (VF.Width ), SEL,
0 commit comments