Skip to content

Commit c35fbb5

Browse files
committed
[VPlan] Use VPReductionPHIRecipe::isOrdered instead of CM (NFC).
Directly retrieve isOrdered from the reduction phi recipe instead of going through the legacy cost model. Split off as suggested in #142322.
1 parent 6d67794 commit c35fbb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9181,7 +9181,7 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
91819181
: FastMathFlags();
91829182
auto *RedRecipe = new VPReductionRecipe(
91839183
Kind, FMFs, CurrentLinkI, PreviousLink, VecOp, CondOp,
9184-
CM.useOrderedReductions(RdxDesc), CurrentLinkI->getDebugLoc());
9184+
PhiR->isOrdered(), CurrentLinkI->getDebugLoc());
91859185
// Append the recipe to the end of the VPBasicBlock because we need to
91869186
// ensure that it comes after all of it's inputs, including CondOp.
91879187
// Delete CurrentLink as it will be invalid if its operand is replaced

0 commit comments

Comments
 (0)