]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Optimize memchr-avx2.S
authorNoah Goldstein <goldstein.w.n@gmail.com>
Mon, 3 May 2021 07:01:58 +0000 (03:01 -0400)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 28 Jan 2022 00:31:45 +0000 (16:31 -0800)
commitfc1ed01cbe4555ae724ecfbe0e71d9aed4530f51
treee53d3520469b26ad19a0d828da836b04676af27b
parent1cbbc82c09b0ccd92c61f57592c70371887713b3
x86: Optimize memchr-avx2.S

No bug. This commit optimizes memchr-avx2.S. The optimizations include
replacing some branches with cmovcc, avoiding some branches entirely
in the less_4x_vec case, making the page cross logic less strict,
asaving a few instructions the in loop return loop. test-memchr,
test-rawmemchr, and test-wmemchr are all passing.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit acfd088a1963ba51cd83c78f95c0ab25ead79e04)
sysdeps/x86_64/multiarch/memchr-avx2.S