[llvm] [SLP] Bail out on store-to-load forwarding hazards (PR #199606)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 19 23:40:28 PDT 2026
================
@@ -53,6 +53,10 @@ def Znver4Model : SchedMachineModel {
// The branch misprediction penalty is in the range from 11 to 18 cycles,
// <...>. The common case penalty is 13 cycles.
let MispredictPenalty = 13;
+ // AMD SOG Zen4, 2.12: a failed store-to-load forward costs roughly a full
+ // L1 load latency of extra delay while the store drains. Used by the SLP
+ // vectorizer to price store chains that would break forwarding.
+ let StoreLoadForwardingPenalty = 13;
----------------
mbhade-amd wrote:
Currently only the AMD Zen4 (znver4) scheduling model sets this value (StoreLoadForwardingPenalty = 13, from the Zen4 SOG ยง2.12). All other targets keep the default of 0, making the penalty a no-op for them; they can opt in later by setting this field in their scheduling model.
https://github.com/llvm/llvm-project/pull/199606
More information about the llvm-commits
mailing list