[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #147513)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 25 02:56:51 PST 2025


================
@@ -8811,9 +8819,11 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
       if (CM.blockNeedsPredicationForAnyReason(CurrentLinkI->getParent()))
         CondOp = RecipeBuilder.getBlockInMask(CurrentLink->getParent());
 
-      auto *RedRecipe = new VPReductionRecipe(
-          Kind, FMFs, CurrentLinkI, PreviousLink, VecOp, CondOp,
-          PhiR->isOrdered(), CurrentLinkI->getDebugLoc());
+      bool UseOrderedReductions = PhiR->isOrdered();
+      ReductionStyle Style = getReductionStyle(true, UseOrderedReductions, 1);
----------------
SamTebbs33 wrote:

Done.

https://github.com/llvm/llvm-project/pull/147513


More information about the llvm-commits mailing list