[llvm-branch-commits] [llvm] [LV] Use VPReductionRecipe for partial reductions (PR #146073)
Florian Hahn via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jul 1 06:03:32 PDT 2025
================
@@ -2744,6 +2702,12 @@ class VPSingleDefBundleRecipe : public VPSingleDefRecipe {
/// vector operands, performing a reduction.add on the result, and adding
/// the scalar result to a chain.
MulAccumulateReduction,
+ /// Represent an inloop multiply-accumulate reduction, multiplying the
+ /// extended vector operands, negating the multiplication, performing a
+ /// reduction.add
+ /// on the result, and adding
+ /// the scalar result to a chain.
+ ExtNegatedMulAccumulateReduction,
----------------
fhahn wrote:
Given that `VPPartialReductionRecipe` is already a sub-class of `VPReductionRecipe`, I think it should be possible to first add support for partial reductions to bundle/expression recipes, without also merging `VPPartialReductionRecipe`. This would simplify the patches and clearly separate the functional from the non-functional changes/refactorings.
It looks like most of the code for supporting partial reductions already needs to explicitly check for partial reductions, so hopefully such a split wouldn't complicate thinga
https://github.com/llvm/llvm-project/pull/146073
More information about the llvm-branch-commits
mailing list