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