[llvm] [LV] NFCI: Create VPExpressions in transformToPartialReductions. (PR #182863)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 06:08:01 PDT 2026
================
@@ -6130,6 +6148,12 @@ static void transformToPartialReduction(const VPPartialReductionChain &Chain,
ExitValue->replaceAllUsesWith(PartialRed);
WidenRecipe->replaceAllUsesWith(PartialRed);
+ // For cost-model purposes, see if we can fold this into a VPExpression.
+ if (VPExpressionRecipe *E = createPartialReductionExpression(PartialRed)) {
----------------
sdesmalen-arm wrote:
We would still be able to form partial reductions, it's just that the cost-model wouldn't be entirely accurate because it wouldn't use a VPExpression, but rather cost each node of that expression individually.
I've asserted it now, and also limited `matchExtendedReductonOperand` to only support mul/fmul.
https://github.com/llvm/llvm-project/pull/182863
More information about the llvm-commits
mailing list