[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #147513)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 09:02:30 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);
----------------
sdesmalen-arm wrote:
nit:
```suggestion
ReductionStyle Style = getReductionStyle(true, PhiR->isOrdered(), 1);
```
https://github.com/llvm/llvm-project/pull/147513
More information about the llvm-commits
mailing list