[llvm] [X86][CostModel] Add per-shape gather/scatter cost tables for AMD znver4+ (PR #199488)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 6 17:38:41 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
----------------
phoebewang wrote:
How about define a schedule model to indicate which target needs what table? Or furthermore deduce the number from the latency of each instructions defined in the schedule model.
https://github.com/llvm/llvm-project/pull/199488
More information about the llvm-commits
mailing list