mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-11 13:50:06 +00:00
x86: Add sse42 implementation to strcmp's ifunc
This has been missing since the the ifuncs where added.
The performance of SSE4.2 is preferable to to SSE2.
Measured on Tigerlake with N = 20 runs.
Geometric Mean of all benchmarks SSE4.2 / SSE2: 0.906
(cherry picked from commit ff439c4717
)
This commit is contained in:
parent
6e008c884d
commit
9d50e162ee
@ -29,6 +29,7 @@
|
||||
extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
|
||||
extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2_unaligned) attribute_hidden;
|
||||
extern __typeof (REDIRECT_NAME) OPTIMIZE (ssse3) attribute_hidden;
|
||||
extern __typeof (REDIRECT_NAME) OPTIMIZE (sse42) attribute_hidden;
|
||||
extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2) attribute_hidden;
|
||||
extern __typeof (REDIRECT_NAME) OPTIMIZE (avx2_rtm) attribute_hidden;
|
||||
extern __typeof (REDIRECT_NAME) OPTIMIZE (evex) attribute_hidden;
|
||||
@ -53,6 +54,10 @@ IFUNC_SELECTOR (void)
|
||||
return OPTIMIZE (avx2);
|
||||
}
|
||||
|
||||
if (CPU_FEATURE_USABLE_P (cpu_features, SSE4_2)
|
||||
&& !CPU_FEATURES_ARCH_P (cpu_features, Slow_SSE4_2))
|
||||
return OPTIMIZE (sse42);
|
||||
|
||||
if (CPU_FEATURES_ARCH_P (cpu_features, Fast_Unaligned_Load))
|
||||
return OPTIMIZE (sse2_unaligned);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user