Blame SOURCES/gcc12-FMA-chains.patch

5e6e6d
commit 8ac76d504ee1216ebffab08463a544d691d85112
5e6e6d
Author: Hongyu Wang <hongyu.wang@intel.com>
5e6e6d
Date:   Tue Dec 6 09:53:35 2022 +0800
5e6e6d
5e6e6d
    i386: Avoid fma_chain for -march=alderlake and sapphirerapids.
5e6e6d
    
5e6e6d
    For Alderlake there is similar issue like PR81616, enable
5e6e6d
    avoid_fma256_chain will also benefit on Intel latest platforms
5e6e6d
    Alderlake and Sapphire Rapids.
5e6e6d
    
5e6e6d
    gcc/ChangeLog:
5e6e6d
    
5e6e6d
            * config/i386/x86-tune.def (X86_TUNE_AVOID_256FMA_CHAINS): Add
5e6e6d
            m_SAPPHIRERAPIDS, m_ALDERLAKE.
5e6e6d
5e6e6d
diff --git a/gcc/config/i386/x86-tune.def b/gcc/config/i386/x86-tune.def
5e6e6d
index d983e2f6213..1e1b206a71c 100644
5e6e6d
--- a/gcc/config/i386/x86-tune.def
5e6e6d
+++ b/gcc/config/i386/x86-tune.def
5e6e6d
@@ -485,7 +485,8 @@ DEF_TUNE (X86_TUNE_AVOID_128FMA_CHAINS, "avoid_fma_chains", m_ZNVER)
5e6e6d
 
5e6e6d
 /* X86_TUNE_AVOID_256FMA_CHAINS: Avoid creating loops with tight 256bit or
5e6e6d
    smaller FMA chain.  */
5e6e6d
-DEF_TUNE (X86_TUNE_AVOID_256FMA_CHAINS, "avoid_fma256_chains", m_ZNVER2 | m_ZNVER3)
5e6e6d
+DEF_TUNE (X86_TUNE_AVOID_256FMA_CHAINS, "avoid_fma256_chains", m_ZNVER2 | m_ZNVER3
5e6e6d
+	  | m_ALDERLAKE | m_SAPPHIRERAPIDS)
5e6e6d
 
5e6e6d
 /* X86_TUNE_V2DF_REDUCTION_PREFER_PHADDPD: Prefer haddpd
5e6e6d
    for v2df vector reduction.  */