[llvm] [LV] NFCI: Create VPExpressions in transformToPartialReductions. (PR #182863)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 03:58:03 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)) {
----------------
fhahn wrote:

can we assert this for now? If we are unable to form partial reductions, we should probably not adjust the scale factor of the reduction below etc?

https://github.com/llvm/llvm-project/pull/182863


More information about the llvm-commits mailing list