aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86/cpu-tunables.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-08-25 11:01:03 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-08-25 11:44:24 -0700
commitace02433fe2f0ce124d191bb273f738ef56fe387 (patch)
tree95f8ae66e11e12d68f2cbaad727a82db21f6b829 /sysdeps/x86/cpu-tunables.c
parent7ab70c98e87b6fbcb3c2c02075b0949ed239ad7e (diff)
downloadglibc-hjl/pr21967/master.tar
glibc-hjl/pr21967/master.tar.gz
glibc-hjl/pr21967/master.tar.bz2
glibc-hjl/pr21967/master.zip
x86: Add MathVec_Prefer_No_AVX512 to cpu-features [BZ #21967]hjl/pr21967/master
AVX512 functions in mathvec are used on machines with AVX512. An AVX2 wrapper is also provided and it can be used when the AVX512 version isn't profitable. MathVec_Prefer_No_AVX512 is addded to cpu-features. If glibc.tune.hwcaps=MathVec_Prefer_No_AVX512 is set in GLIBC_TUNABLES environment variable, the AVX2 wrapper will be used. [BZ #21967] * sysdeps/x86/cpu-features.h (bit_arch_MathVec_Prefer_No_AVX512): New. (index_arch_MathVec_Prefer_No_AVX512): Likewise. * sysdeps/x86/cpu-tunables.c (TUNABLE_CALLBACK (set_hwcaps)): Handle MathVec_Prefer_No_AVX512.
Diffstat (limited to 'sysdeps/x86/cpu-tunables.c')
-rw-r--r--sysdeps/x86/cpu-tunables.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/x86/cpu-tunables.c b/sysdeps/x86/cpu-tunables.c
index 0ab708cca8..ec72d86f08 100644
--- a/sysdeps/x86/cpu-tunables.c
+++ b/sysdeps/x86/cpu-tunables.c
@@ -303,6 +303,13 @@ TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp)
disable, 23);
}
break;
+ case 24:
+ {
+ CHECK_GLIBC_IFUNC_ARCH_NEED_ARCH_BOTH
+ (n, cpu_features, MathVec_Prefer_No_AVX512,
+ AVX512F_Usable, disable, 24);
+ }
+ break;
case 26:
{
CHECK_GLIBC_IFUNC_ARCH_NEED_CPU_BOTH