https://gcc.gnu.org/g:ff4fa4dfc43d8a0a0b5adc4c11424bfa26b72e98
commit r16-8966-gff4fa4dfc43d8a0a0b5adc4c11424bfa26b72e98 Author: liuhongt <[email protected]> Date: Mon May 25 22:40:00 2026 -0700 i386: Disable use_gather_2parts and use_gather_4parts for Diamond Rapids DMR architecture achieves optimal pipeline utilization and parallelism for gather emulation with 2/4-element vector. Adjust the tune accordingly. gcc/ChangeLog: * config/i386/x86-tune.def (X86_TUNE_USE_GATHER_2PARTS): Disable for m_DIAMONDRAPIDS. (X86_TUNE_USE_GATHER_4PARTS): Likewise. (cherry picked from commit 5c556f9f539a9493fea9401f2e106bfd8be9ed5e) Diff: --- gcc/config/i386/x86-tune.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/x86-tune.def b/gcc/config/i386/x86-tune.def index 05a5d5bab501..3b74091db351 100644 --- a/gcc/config/i386/x86-tune.def +++ b/gcc/config/i386/x86-tune.def @@ -530,7 +530,7 @@ DEF_TUNE (X86_TUNE_AVOID_4BYTE_PREFIXES, "avoid_4byte_prefixes", /* X86_TUNE_USE_GATHER_2PARTS: Use gather instructions for vectors with 2 elements. */ DEF_TUNE (X86_TUNE_USE_GATHER_2PARTS, "use_gather_2parts", - ~(m_ZNVER | m_CORE_HYBRID + ~(m_ZNVER | m_CORE_HYBRID | m_DIAMONDRAPIDS | m_YONGFENG | m_SHIJIDADAO | m_CORE_ATOM | m_GENERIC | m_GDS)) /* X86_TUNE_USE_SCATTER_2PARTS: Use scater instructions for vectors with 2 @@ -541,7 +541,7 @@ DEF_TUNE (X86_TUNE_USE_SCATTER_2PARTS, "use_scatter_2parts", /* X86_TUNE_USE_GATHER_4PARTS: Use gather instructions for vectors with 4 elements. */ DEF_TUNE (X86_TUNE_USE_GATHER_4PARTS, "use_gather_4parts", - ~(m_ZNVER | m_CORE_HYBRID + ~(m_ZNVER | m_CORE_HYBRID | m_DIAMONDRAPIDS | m_YONGFENG | m_SHIJIDADAO | m_CORE_ATOM | m_GENERIC | m_GDS)) /* X86_TUNE_USE_SCATTER_4PARTS: Use scater instructions for vectors with 4
