Skip to content

Commit 3813567

Browse files
committed
[VPlan] Clarify transform name to handlMaxNumNumReductions. (NFC)
Clarify name as suggested in #149736, as only FMaxNum and FMinNum are handled.
1 parent c9cbd4e commit 3813567

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8793,8 +8793,8 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(
87938793

87948794
// Apply mandatory transformation to handle FP maxnum/minnum reduction with
87958795
// NaNs if possible, bail out otherwise.
8796-
if (!VPlanTransforms::runPass(
8797-
VPlanTransforms::handleMaxMinNumReductionsWithoutFastMath, *Plan))
8796+
if (!VPlanTransforms::runPass(VPlanTransforms::handleMaxMinNumReductions,
8797+
*Plan))
87988798
return nullptr;
87998799

88008800
// Transform recipes to abstract recipes if it is legal and beneficial and

llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ void VPlanTransforms::attachCheckBlock(VPlan &Plan, Value *Cond,
653653
}
654654
}
655655

656-
bool VPlanTransforms::handleMaxMinNumReductionsWithoutFastMath(VPlan &Plan) {
656+
bool VPlanTransforms::handleMaxMinNumReductions(VPlan &Plan) {
657657
auto GetMinMaxCompareValue = [](VPReductionPHIRecipe *RedPhiR) -> VPValue * {
658658
auto *MinMaxR = dyn_cast<VPRecipeWithIRFlags>(
659659
RedPhiR->getBackedgeValue()->getDefiningRecipe());

llvm/lib/Transforms/Vectorize/VPlanTransforms.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ struct VPlanTransforms {
107107
/// try to update the vector loop to exit early if any input is NaN and resume
108108
/// executing in the scalar loop to handle the NaNs there. Return false if
109109
/// this attempt was unsuccessful.
110-
static bool handleMaxMinNumReductionsWithoutFastMath(VPlan &Plan);
110+
static bool handleMaxMinNumReductions(VPlan &Plan);
111111

112112
/// Clear NSW/NUW flags from reduction instructions if necessary.
113113
static void clearReductionWrapFlags(VPlan &Plan);

0 commit comments

Comments
 (0)