about summary refs log tree commit diff
path: root/sysdeps/x86_64/multiarch/init-arch.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-02-17 02:30:01 -0500
committerMike Frysinger <vapier@gentoo.org>2015-02-17 02:30:01 -0500
commit2511fe206c59793d25bf0e3e24a185545b3a93b6 (patch)
tree1a46462f9b40a58c7cb7f9751d4db20df56668de /sysdeps/x86_64/multiarch/init-arch.c
parent1b08ac828aeafeff86fa67108a8ad285d32f70e6 (diff)
parent4d54424420c6300efbf57a7b9aa8635a8b8c1942 (diff)
downloadglibc-2511fe206c59793d25bf0e3e24a185545b3a93b6.tar.gz
glibc-2511fe206c59793d25bf0e3e24a185545b3a93b6.tar.xz
glibc-2511fe206c59793d25bf0e3e24a185545b3a93b6.zip
Merge branch 'release/2.20/master' into 'gentoo/2.20'
Diffstat (limited to 'sysdeps/x86_64/multiarch/init-arch.c')
-rw-r--r--sysdeps/x86_64/multiarch/init-arch.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c
index 2a6dcb78d8..f7c1bbe0db 100644
--- a/sysdeps/x86_64/multiarch/init-arch.c
+++ b/sysdeps/x86_64/multiarch/init-arch.c
@@ -167,9 +167,14 @@ __init_cpu_features (void)
 	  /* Determine if AVX is usable.  */
 	  if (CPUID_AVX)
 	    __cpu_features.feature[index_AVX_Usable] |= bit_AVX_Usable;
-	  /* Determine if AVX2 is usable.  */
+#if index_AVX2_Usable != index_AVX_Fast_Unaligned_Load
+# error index_AVX2_Usable != index_AVX_Fast_Unaligned_Load
+#endif
+	  /* Determine if AVX2 is usable.  Unaligned load with 256-bit
+	     AVX registers are faster on processors with AVX2.  */
 	  if (CPUID_AVX2)
-	    __cpu_features.feature[index_AVX2_Usable] |= bit_AVX2_Usable;
+	    __cpu_features.feature[index_AVX2_Usable]
+	      |= bit_AVX2_Usable | bit_AVX_Fast_Unaligned_Load;
 	  /* Determine if FMA is usable.  */
 	  if (CPUID_FMA)
 	    __cpu_features.feature[index_FMA_Usable] |= bit_FMA_Usable;