[llvm] [LV] Use VPReductionRecipe for partial reductions (PR #147513)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 20 08:08:51 PST 2025
================
@@ -8278,8 +8292,10 @@ VPRecipeBuilder::tryToCreatePartialReduction(VPInstruction *Reduction,
VPValue *Cond = nullptr;
if (CM.blockNeedsPredicationForAnyReason(ReductionI->getParent()))
Cond = getBlockInMask(Builder.getInsertBlock());
- return new VPPartialReductionRecipe(ReductionOpcode, Accumulator, BinOp, Cond,
- ScaleFactor, ReductionI);
+
+ return new VPReductionRecipe(
+ RecurKind::Add, FastMathFlags(), ReductionI, Accumulator, BinOp, Cond,
----------------
SamTebbs33 wrote:
Passing Add here is equivalent since we convert Sub to Add a couple of code blocks above.
https://github.com/llvm/llvm-project/pull/147513
More information about the llvm-commits
mailing list