[llvm] [SLP] Support ordered FAdd reductions in SLPVectorizer (PR #146570)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 07:15:51 PDT 2025


================
@@ -22423,7 +22552,7 @@ class HorizontalReduction {
       // original scalar identity operations on matched horizontal reductions).
       IsSupportedHorRdxIdentityOp = RdxKind != RecurKind::Mul &&
                                     RdxKind != RecurKind::FMul &&
-                                    RdxKind != RecurKind::FMulAdd;
+                                    RdxKind != RecurKind::FMulAdd && !isOrderedFaddReduction();
----------------
alexey-bataev wrote:

It would be good to split this function and have separate functions for associative/non-associative reductions to simplify maintenance.
I would start with moving some associative-specific parts into separate functions and implemnent non-associative parts also in a separate util functions

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


More information about the llvm-commits mailing list