[llvm-branch-commits] [llvm] [LV] Bundle sub reductions into VPExpressionRecipe (PR #147255)

Sam Tebbs via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jul 8 07:27:43 PDT 2025


================
@@ -1645,8 +1645,10 @@ class TargetTransformInfo {
   /// extensions. This is the cost of as:
   /// ResTy vecreduce.add(mul (A, B)).
   /// ResTy vecreduce.add(mul(ext(Ty A), ext(Ty B)).
+  /// The multiply can optionally be negated, which signifies that it is a sub
+  /// reduction.
   LLVM_ABI InstructionCost getMulAccReductionCost(
-      bool IsUnsigned, Type *ResTy, VectorType *Ty,
+      bool IsUnsigned, Type *ResTy, VectorType *Ty, bool Negated,
----------------
SamTebbs33 wrote:

Good idea, done.

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


More information about the llvm-branch-commits mailing list