x86: Optimize memchr-avx2.S
authorNoah Goldstein <goldstein.w.n@gmail.com>
Mon, 3 May 2021 07:01:58 +0000 (03:01 -0400)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Tue, 4 May 2021 01:17:21 +0000 (21:17 -0400)
commitacfd088a1963ba51cd83c78f95c0ab25ead79e04
treef5b41e1b229d29ec03d23724356883211d94ffdd
parent77c1573dbceebf75203e4201615def9765599d87
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>
sysdeps/x86_64/multiarch/memchr-avx2.S