[llvm] [X86][CostModel] Add per-shape gather/scatter cost tables for AMD znver4+ (PR #199488)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 6 12:24:15 PDT 2026
================
@@ -721,6 +721,17 @@ def TuningFastGather
: SubtargetFeature<"fast-gather", "HasFastGather", "true",
"Indicates if gather is reasonably fast (this is true for Skylake client and all AVX-512 CPUs)">;
+// Use AMD Zen-tuned cost tables for masked gather/scatter intrinsics in the
+// X86 TargetTransformInfo cost model. Refines the flat overhead used by other
+// AVX-512 targets with per-element-type/per-VL costs measured on znver4 and
+// znver5. Inherited automatically by every znver4+ CPU via ZN4Tuning; not
+// applied to pre-AVX-512 Zen parts (znver1..3), which take the scalarise
+// path for masked gather anyway.
+def TuningPreferAMDZenGSCost
----------------
Andarwinux wrote:
I mean, how should it know which table to use? TuningPreferGSCostTable sounds very neutral. But if it were TuningPreferAMDGSCostTable, then just to add a TuningPreferIntelGSCostTable. And, what if Zen6 needed a different table than Zen4/5?
https://github.com/llvm/llvm-project/pull/199488
More information about the llvm-commits
mailing list