mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-30 10:45:40 +03:00
x86: Disable AVX Fast Unaligned Load on Hygon 1/2/3
- Performance testing revealed significant memcpy performance degradation when bit_arch_AVX_Fast_Unaligned_Load is enabled on Hygon 3. - Hygon confirmed AVX performance issues in certain memory functions. - Glibc benchmarks show SSE outperforms AVX for memcpy/memmove/memset/strcmp/strcpy/strlen and so on. - Hardware differences primarily in floating-point operations don't justify AVX usage for memory operations. Reviewed-by: gaoxiang <gaoxiang@kylinos.cn> Signed-off-by: litenglong <litenglong@kylinos.cn> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
@@ -1123,6 +1123,12 @@ disable_tsx:
|
|||||||
hardware. */
|
hardware. */
|
||||||
cpu_features->preferred[index_arch_Avoid_Non_Temporal_Memset]
|
cpu_features->preferred[index_arch_Avoid_Non_Temporal_Memset]
|
||||||
&= ~bit_arch_Avoid_Non_Temporal_Memset;
|
&= ~bit_arch_Avoid_Non_Temporal_Memset;
|
||||||
|
if (model < 0x4)
|
||||||
|
{
|
||||||
|
/* Unaligned AVX loads are slower. */
|
||||||
|
cpu_features->preferred[index_arch_AVX_Fast_Unaligned_Load]
|
||||||
|
&= ~bit_arch_AVX_Fast_Unaligned_Load;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user