@@ -4883,8 +4883,9 @@ bool LoopVectorizationPlanner::isMoreProfitable(
4883
4883
if (!MaxTripCount)
4884
4884
return CmpFn (CostA * EstimatedWidthB, CostB * EstimatedWidthA);
4885
4885
4886
- auto GetCost = [MaxTripCount, this ](unsigned VF, InstructionCost VectorCost,
4887
- InstructionCost ScalarCost) {
4886
+ auto GetCostForTC = [MaxTripCount, this ](unsigned VF,
4887
+ InstructionCost VectorCost,
4888
+ InstructionCost ScalarCost) {
4888
4889
// If the trip count is a known (possibly small) constant, the trip count
4889
4890
// will be rounded up to an integer number of iterations under
4890
4891
// FoldTailByMasking. The total cost in that case will be
@@ -4898,8 +4899,8 @@ bool LoopVectorizationPlanner::isMoreProfitable(
4898
4899
return VectorCost * (MaxTripCount / VF) + ScalarCost * (MaxTripCount % VF);
4899
4900
};
4900
4901
4901
- auto RTCostA = GetCost (EstimatedWidthA, CostA, A.ScalarCost );
4902
- auto RTCostB = GetCost (EstimatedWidthB, CostB, B.ScalarCost );
4902
+ auto RTCostA = GetCostForTC (EstimatedWidthA, CostA, A.ScalarCost );
4903
+ auto RTCostB = GetCostForTC (EstimatedWidthB, CostB, B.ScalarCost );
4903
4904
return CmpFn (RTCostA, RTCostB);
4904
4905
}
4905
4906
0 commit comments