[libc-commits] [PATCH] D132121: [NFC][libc] rearrange aarch64 memset code to better match new implementation

Andre Vieira via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Aug 19 07:17:14 PDT 2022


avieira added inline comments.


================
Comment at: libc/src/string/memory_utils/memset_implementations.h:103
   }
-  if (count < 448 || value != 0 || !AArch64ZVA(dst, count))
+  if (count >= 448 && value == 0 && hasZva())
+    return splat_set<Align<_64, Arg::_1>::Then<Loop<Zva64>>>(dst, 0, count);
----------------
gchatelet wrote:
> courbet wrote:
> > ditto.
> @avieira how did you come up with 448 here?
I believe I found this number through benchmarking a non ZVA version with ZVA to see at what sizes (more or less) ZVA started to beat non ZVA. So 'Magical' is as good a way to describe it as I can come up with now too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132121



More information about the libc-commits mailing list