@@ -2642,7 +2642,7 @@ tryToMatchAndCreateExtendedReduction(VPReductionRecipe *Red, VPCostContext &Ctx,
26422642 Type *RedTy = Ctx.Types .inferScalarType (Red);
26432643 VPValue *VecOp = Red->getVecOp ();
26442644
2645- // Test if using extended-reduction is profitable and clamp the range .
2645+ // Clamp the range if using extended-reduction is profitable.
26462646 auto IsExtendedRedValidAndClampRange = [&](unsigned Opcode, bool isZExt,
26472647 Type *SrcTy) -> bool {
26482648 return LoopVectorizationPlanner::getDecisionAndClampRange (
@@ -2687,8 +2687,7 @@ tryToMatchAndCreateMulAccumulateReduction(VPReductionRecipe *Red,
26872687
26882688 Type *RedTy = Ctx.Types .inferScalarType (Red);
26892689
2690- // Test if using mulutiply-accumulate-reduction is beneficial and clamp the
2691- // range.
2690+ // Clamp the range if using multiply-accumulate-reduction is profitable.
26922691 auto IsMulAccValidAndClampRange =
26932692 [&](bool isZExt, VPWidenRecipe *Mul, VPWidenCastRecipe *Ext0,
26942693 VPWidenCastRecipe *Ext1, VPWidenCastRecipe *OuterExt) -> bool {
@@ -2766,7 +2765,7 @@ tryToMatchAndCreateMulAccumulateReduction(VPReductionRecipe *Red,
27662765 return nullptr ;
27672766}
27682767
2769- // / This function try to create abstract recipes from reduction recipe for
2768+ // / This function tries to create abstract recipes from the reduction recipe for
27702769// / following optimizations and cost estimation.
27712770static void tryToCreateAbstractReductionRecipe (VPReductionRecipe *Red,
27722771 VPCostContext &Ctx,
@@ -2789,7 +2788,7 @@ void VPlanTransforms::convertToAbstractRecipes(VPlan &Plan, VPCostContext &Ctx,
27892788 VFRange &Range) {
27902789 for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
27912790 vp_depth_first_deep (Plan.getVectorLoopRegion ()))) {
2792- for (VPRecipeBase &R : make_early_inc_range ( *VPBB) ) {
2791+ for (VPRecipeBase &R : *VPBB) {
27932792 if (auto *Red = dyn_cast<VPReductionRecipe>(&R))
27942793 tryToCreateAbstractReductionRecipe (Red, Ctx, Range);
27952794 }
0 commit comments