[llvm] [SLP] Add store-to-load forwarding conflict cost for widened store chains (PR #199606)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 05:49:55 PDT 2026


================

----------------
alexey-bataev wrote:

```suggestion
      // Same hazard model as for stores: a widened load can straddle
      // same-base stores that stay scalar or narrower in this tree.
      if (EnableSLPStoreLoadForwardCheck &&
          E->State == TreeEntry::Vectorize &&
          (CostKind == TTI::TCK_RecipThroughput ||
           CostKind == TTI::TCK_Latency) &&
          findStoreLoadForwardingHazardForLoad(LI0, E->Scalars.size()))
        VecLdCost += TTI->getStoreLoadForwardingConflictCost(VecTy, CostKind);
      return VecLdCost + CommonCost;
```

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


More information about the llvm-commits mailing list