[libc-commits] [PATCH] D128335: [libc][mem*] Introduce Algorithms for new mem framework

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jun 27 01:46:43 PDT 2022


sivachandra added inline comments.


================
Comment at: libc/src/string/memory_utils/algorithm.h:148
+  template <typename SrcAddrT1, typename SrcAddrT2>
+  static inline int32_t threeWayCmp(SrcAddrT1 src1, SrcAddrT2 src2,
+                                    size_t runtime_size) {
----------------
gchatelet wrote:
> courbet wrote:
> > Does this one even make sense if `runtime_size > 2*SizedOp::SIZE` ? Maybe add an assert ?
> It does not make sense but I think we cannot use `assert` inside `memcpy` and other low level functions as `assert` could use them under the hood.
> + @sivachandra for confirmation.
Yes, for now lets avoid asserts. I will get back to you with a detailed answer in the coming weeks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128335



More information about the libc-commits mailing list