diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/x86/cpu-features.c | 7 |
2 files changed, 11 insertions, 2 deletions
@@ -1,5 +1,11 @@ 2017-08-04 H.J. Lu <hongjiu.lu@intel.com> + [BZ #21871] + * sysdeps/x86/cpu-features.c (init_cpu_features): Set + bit_arch_Use_dl_runtime_resolve_opt only with AVX512F. + +2017-08-04 H.J. Lu <hongjiu.lu@intel.com> + [BZ #21790] * sysdeps/i386/i586/memset.S (__memset_zero_constant_len_parameter): Removed. diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index 1d087ea..6f90084 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -244,10 +244,13 @@ init_cpu_features (struct cpu_features *cpu_features) |= bit_arch_Prefer_No_AVX512; /* To avoid SSE transition penalty, use _dl_runtime_resolve_slow. - If XGETBV suports ECX == 1, use _dl_runtime_resolve_opt. */ + If XGETBV suports ECX == 1, use _dl_runtime_resolve_opt. + Use _dl_runtime_resolve_opt only with AVX512F since it is + slower than _dl_runtime_resolve_slow with AVX. */ cpu_features->feature[index_arch_Use_dl_runtime_resolve_slow] |= bit_arch_Use_dl_runtime_resolve_slow; - if (cpu_features->max_cpuid >= 0xd) + if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable) + && cpu_features->max_cpuid >= 0xd) { unsigned int eax; |