[libc-commits] [PATCH] D106641: [libc] rewrite aarch64 memcmp implementation

Andre Vieira via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jul 23 03:39:56 PDT 2021


avieira added inline comments.


================
Comment at: libc/src/string/aarch64/memcmp.cpp:43
+  // [64, 127]
+  return ThreeWayCompare<Skip<32>::Then<Loop<_16>>>(lhs, rhs, count);
 }
----------------
gchatelet wrote:
> @avieira shouldn't this be `Skip<64>` instead of `Skip<32>` here?
No I think 32 is right, It only goes through two _16 Equals before reaching this on lines 34 and 38. However, since it's guaranteed >= 64 we could do something like Skip<32>::Then<Chained<_32,Loop<_16>> (untested).

I'll benchmark it and let you know.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106641/new/

https://reviews.llvm.org/D106641



More information about the libc-commits mailing list