[llvm-branch-commits] [llvm] [LV] Only create partial reductions when profitable. (PR #181706)
Benjamin Maxwell via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 12 07:08:28 PDT 2026
================
@@ -6216,10 +6195,17 @@ getScaledReductions(VPReductionPHIRecipe *RedPhiR, VPCostContext &CostCtx,
if (!PHISize.hasKnownScalarFactor(ExtSrcSize))
return std::nullopt;
+ /// Check if a partial reduction chain is supported by the target (i.e.
+ /// does not have an invalid cost) for the given VF range. Clamps the range
+ /// and returns true if feasible for any VF.
VPPartialReductionChain Chain(
----------------
MacDue wrote:
For another PR: I think we should also rename `VPPartialReductionChain` to just `VPPartialReduction`, calling it a "chain" is somewhat confusing when mixed with chained partial reductions.
https://github.com/llvm/llvm-project/pull/181706
More information about the llvm-branch-commits
mailing list