diff options
author | Noah Goldstein <goldstein.w.n@gmail.com> | 2021-05-17 13:56:52 -0400 |
---|---|---|
committer | Noah Goldstein <goldstein.w.n@gmail.com> | 2021-05-18 22:57:44 -0400 |
commit | 16d12015c57701b08d7bbed6ec536641bcafb428 (patch) | |
tree | ade2bfb8b7361e3a29c71d086bb6c4b683311d0b /sysdeps/x86_64/multiarch/ifunc-memcmp.h | |
parent | e68d6fcccae10f325799b965875744470adc7281 (diff) | |
download | glibc-16d12015c57701b08d7bbed6ec536641bcafb428.tar.gz glibc-16d12015c57701b08d7bbed6ec536641bcafb428.tar.xz glibc-16d12015c57701b08d7bbed6ec536641bcafb428.zip |
x86: Optimize memcmp-avx2-movbe.S
No bug. This commit optimizes memcmp-avx2.S. The optimizations include adding a new vec compare path for small sizes, reorganizing the entry control flow, and removing some unnecissary ALU instructions from the main loop. test-memcmp and test-wmemcmp are both passing. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'sysdeps/x86_64/multiarch/ifunc-memcmp.h')
-rw-r--r-- | sysdeps/x86_64/multiarch/ifunc-memcmp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/ifunc-memcmp.h b/sysdeps/x86_64/multiarch/ifunc-memcmp.h index 8bee1aff75..89e2129968 100644 --- a/sysdeps/x86_64/multiarch/ifunc-memcmp.h +++ b/sysdeps/x86_64/multiarch/ifunc-memcmp.h @@ -33,6 +33,7 @@ IFUNC_SELECTOR (void) if (CPU_FEATURE_USABLE_P (cpu_features, AVX2) && CPU_FEATURE_USABLE_P (cpu_features, MOVBE) + && CPU_FEATURE_USABLE_P (cpu_features, BMI2) && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) { if (CPU_FEATURE_USABLE_P (cpu_features, AVX512VL) |