mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
x86-64: Check FMA_Usable in ifunc-mathvec-avx2.h [BZ #21966]
Since the AVX2 version of mathvec functions uses FMA, it can only be used when FMA is usable. [BZ #21966] * sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx2.h (IFUNC_SELECTOR): Don't use the AVX2 version if FMA isn't usable.
This commit is contained in:
parent
486afa6d27
commit
098b9dd468
@ -1,3 +1,10 @@
|
||||
2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #21966]
|
||||
* sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx2.h
|
||||
(IFUNC_SELECTOR): Don't use the AVX2 version if FMA isn't
|
||||
usable.
|
||||
|
||||
2017-08-17 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* bug17079.c: Update to new test harness.
|
||||
|
@ -31,7 +31,8 @@ IFUNC_SELECTOR (void)
|
||||
{
|
||||
const struct cpu_features* cpu_features = __get_cpu_features ();
|
||||
|
||||
if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
|
||||
if (CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
|
||||
&& CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
|
||||
return OPTIMIZE (avx2);
|
||||
|
||||
return OPTIMIZE (sse_wrapper);
|
||||
|
Loading…
Reference in New Issue
Block a user