[llvm] [SLP] Ensure TreeCost is scaled for ordered fadd reductions (PR #199388)

Kavin Gnanapandithan via llvm-commits llvm-commits at lists.llvm.org
Sun May 24 07:22:09 PDT 2026


================
@@ -18752,8 +18757,8 @@ InstructionCost BoUpSLP::calculateTreeCostAndTrimNonProfitable(
       }
     }
     if (!CostIsFree && !Scale) {
-      Scale = IsGatherLike ? getGatherNodeEffectiveScale(TE)
-                           : getScaleToLoopIterations(TE);
+      Scale = IsGatherLike ? getGatherNodeEffectiveScale(TE, RdxRoot)
+                           : getScaleToLoopIterations(TE, nullptr, RdxRoot);
----------------
KavinTheG wrote:

Will fix. 

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


More information about the llvm-commits mailing list