aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/multiarch/memset.S
diff options
context:
space:
mode:
authorAndrew Senkevich <andrew.senkevich@intel.com>2015-12-19 02:47:28 +0300
committerAndrew Senkevich <andrew.senkevich@intel.com>2015-12-19 02:47:28 +0300
commit83d776f979342f923b5c3d2a5b43afab841c6086 (patch)
tree180682939f88351b00817f2092e24817ddbdf07f /sysdeps/x86_64/multiarch/memset.S
parent794950ed1d29853158d783d57f72260f5665afe5 (diff)
downloadglibc-83d776f979342f923b5c3d2a5b43afab841c6086.tar
glibc-83d776f979342f923b5c3d2a5b43afab841c6086.tar.gz
glibc-83d776f979342f923b5c3d2a5b43afab841c6086.tar.bz2
glibc-83d776f979342f923b5c3d2a5b43afab841c6086.zip
Added memset optimized with AVX512 for KNL hardware.
It shows improvement up to 28% over AVX2 memset (performance results attached at <https://sourceware.org/ml/libc-alpha/2015-12/msg00052.html>). * sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S: New file. * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Added new file. * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Added new tests. * sysdeps/x86_64/multiarch/memset.S: Added new IFUNC branch. * sysdeps/x86_64/multiarch/memset_chk.S: Likewise. * sysdeps/x86/cpu-features.h (bit_Prefer_No_VZEROUPPER, index_Prefer_No_VZEROUPPER): New. * sysdeps/x86/cpu-features.c (init_cpu_features): Set the Prefer_No_VZEROUPPER for Knights Landing.
Diffstat (limited to 'sysdeps/x86_64/multiarch/memset.S')
-rw-r--r--sysdeps/x86_64/multiarch/memset.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/memset.S b/sysdeps/x86_64/multiarch/memset.S
index dbc00d25e3..5fa360d58d 100644
--- a/sysdeps/x86_64/multiarch/memset.S
+++ b/sysdeps/x86_64/multiarch/memset.S
@@ -30,6 +30,13 @@ ENTRY(memset)
HAS_ARCH_FEATURE (AVX2_Usable)
jz 2f
leaq __memset_avx2(%rip), %rax
+#ifdef HAVE_AVX512_ASM_SUPPORT
+ HAS_ARCH_FEATURE (AVX512F_Usable)
+ jz 2f
+ HAS_ARCH_FEATURE (Prefer_No_VZEROUPPER)
+ jz 2f
+ leaq __memset_avx512_no_vzeroupper(%rip), %rax
+#endif
2: ret
END(memset)
#endif