]> git.ipfire.org Git - thirdparty/gcc.git/commit
Disable gather/scatter for zen4
authorJan Hubicka <jh@suse.cz>
Mon, 16 Jan 2023 14:40:45 +0000 (15:40 +0100)
committerJan Hubicka <jh@suse.cz>
Sun, 29 Jan 2023 03:23:16 +0000 (04:23 +0100)
commit7790d4b2e5c6ed0d4957e3b7948e24023447fbfd
tree1e6667f8e3e04d576c4c58dab5c655f968c66079
parent489c81db7d4f75894e9d34aa90fe7224cfafb53a
Disable gather/scatter for zen4

this patch adds more tunes for zen4:
 - new tunes for avx512 scater instructions.
   In micro benchmarks these seems consistent loss compared to open-coded coe
 - disable use of gather for zen4
   While these are win for a micro benchmarks (based on TSVC), enabling gather
   is a loss for parest. So for now it seems safe to keep it off.
 - disable pass to avoid FMA chains for znver4 since fmadd was optimized and does not seem
   to cause regressions.

* config/i386/i386.cc (ix86_vectorize_builtin_scatter): Guard scatter
by TARGET_USE_SCATTER.
* config/i386/i386.h (TARGET_USE_SCATTER_2PARTS,
TARGET_USE_SCATTER_4PARTS, TARGET_USE_SCATTER): New macros.
* config/i386/x86-tune.def (TARGET_USE_SCATTER_2PARTS,
TARGET_USE_SCATTER_4PARTS, TARGET_USE_SCATTER): New tunes.
(X86_TUNE_AVOID_256FMA_CHAINS, X86_TUNE_AVOID_512FMA_CHAINS): Disable
for znver4.  (X86_TUNE_USE_GATHER): Disable for zen4.

(cherry picked from commit 967592488c64a86f37bef3dabebb56364f14acdd)
gcc/config/i386/i386.cc
gcc/config/i386/i386.h
gcc/config/i386/x86-tune.def