Hi,
This patch fixes the AVX512BMM cpuid check for zen6. The AVX512BMM is
present in the extended features instead of the standard leaf.
bootstraped and regtested on x86_64-linux-gnu. Ok for trunk ?
gcc/ChangeLog:
* common/config/i386/cpuinfo.h (get_available_features): Detect AVXBMM
from extended features instead of standard leaf.
---
gcc/common/config/i386/cpuinfo.h | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
index fef8f90f94c..153ab194864 100644
--- a/gcc/common/config/i386/cpuinfo.h
+++ b/gcc/common/config/i386/cpuinfo.h
@@ -1110,16 +1110,6 @@ get_available_features (struct __processor_model
*cpu_model,
}
}
- /* Get Advanced Features at level 0x21 (eax = 0x21). */
- if (max_cpuid_level >= 0x21)
- {
- __cpuid (0x21, eax, ebx, ecx, edx);
- if (eax & bit_AVX512BMM)
- {
- set_feature (FEATURE_AVX512BMM);
- }
- }
-
/* Get Advanced Features at level 0x24 (eax = 0x24, ecx = 0). */
if (avx10_set && max_cpuid_level >= 0x24)
{
@@ -1205,6 +1195,8 @@ get_available_features (struct __processor_model
*cpu_model,
{
set_feature (FEATURE_PREFETCHI);
}
+ if (eax & bit_AVX512BMM)
+ set_feature (FEATURE_AVX512BMM);
}
#undef set_feature
--
2.34.1