[llvm-branch-commits] [llvm] [SLP] Cancel the phantom load saving on fadd reductions that lose an fma (PR #228903)

Alexey Bataev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Oct 4 08:28:48 PDT 2026


================
@@ -2479,6 +2491,15 @@ class slpvectorizer::BoUpSLP {
       const SmallDenseSet<unsigned, 8> &NodesToKeepBWs, unsigned &MaxDepthLevel,
       bool &IsProfitableToDemote, bool IsTruncRoot) const;
 
+  /// \returns the load saving credited to the vectorized load bundle \p TE
+  /// that never materializes on a target whose consecutive scalar loads
+  /// coalesce into the same wide access, or zero if \p LoadSavings keeps it.
+  /// Only clean bundles with no reordering, reuse or bit-width reduction lose
+  /// the saving.
+  InstructionCost
+  getCoalescedLoadPhantomSaving(const TreeEntry &TE,
+                                CoalescedLoadSavings LoadSavings) const;
----------------
alexey-bataev wrote:

Also looks like a part of TTI, not SLP

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


More information about the llvm-branch-commits mailing list