[llvm] c35fbb5 - [VPlan] Use VPReductionPHIRecipe::isOrdered instead of CM (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 6 12:52:16 PDT 2025


Author: Florian Hahn
Date: 2025-07-06T20:49:34+01:00
New Revision: c35fbb5460b476ecd210da024eb7c0dda4ad662b

URL: https://github.com/llvm/llvm-project/commit/c35fbb5460b476ecd210da024eb7c0dda4ad662b
DIFF: https://github.com/llvm/llvm-project/commit/c35fbb5460b476ecd210da024eb7c0dda4ad662b.diff

LOG: [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
https://github.com/llvm/llvm-project/pull/142322.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 586250ca63a4e..05d10f0b84fac 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -9181,7 +9181,7 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
                                : FastMathFlags();
       auto *RedRecipe = new VPReductionRecipe(
           Kind, FMFs, CurrentLinkI, PreviousLink, VecOp, CondOp,
-          CM.useOrderedReductions(RdxDesc), CurrentLinkI->getDebugLoc());
+          PhiR->isOrdered(), CurrentLinkI->getDebugLoc());
       // Append the recipe to the end of the VPBasicBlock because we need to
       // ensure that it comes after all of it's inputs, including CondOp.
       // Delete CurrentLink as it will be invalid if its operand is replaced


        


More information about the llvm-commits mailing list