[libc-commits] [libc] 84f887c - Revert "[libc] Fix embedded version of bcmp / memcmp"

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Fri Oct 14 06:22:21 PDT 2022


Author: Guillaume Chatelet
Date: 2022-10-14T13:21:19Z
New Revision: 84f887c82b349afa6f4ac7b70461b735c707c28a

URL: https://github.com/llvm/llvm-project/commit/84f887c82b349afa6f4ac7b70461b735c707c28a
DIFF: https://github.com/llvm/llvm-project/commit/84f887c82b349afa6f4ac7b70461b735c707c28a.diff

LOG: Revert "[libc] Fix embedded version of bcmp / memcmp"

This reverts commit 7c9b8fa6d2d921569a1ebeb4816edb7b05a37cdd.

Added: 
    

Modified: 
    libc/src/string/memory_utils/bcmp_implementations.h
    libc/src/string/memory_utils/memcmp_implementations.h

Removed: 
    


################################################################################
diff  --git a/libc/src/string/memory_utils/bcmp_implementations.h b/libc/src/string/memory_utils/bcmp_implementations.h
index 9d9ad2bb9873..2b744647e48b 100644
--- a/libc/src/string/memory_utils/bcmp_implementations.h
+++ b/libc/src/string/memory_utils/bcmp_implementations.h
@@ -24,7 +24,7 @@ namespace __llvm_libc {
 inline_bcmp_embedded_tiny(CPtr p1, CPtr p2, size_t count) {
 #pragma nounroll
   for (size_t offset = 0; offset < count; ++offset)
-    if (auto value = generic::Bcmp<1>::block(p1 + offset, p2 + offset))
+    if (auto value = generic::Bcmp<1>::block(p1, p2))
       return value;
   return BcmpReturnType::ZERO();
 }

diff  --git a/libc/src/string/memory_utils/memcmp_implementations.h b/libc/src/string/memory_utils/memcmp_implementations.h
index af85afa696e9..faddebcb6622 100644
--- a/libc/src/string/memory_utils/memcmp_implementations.h
+++ b/libc/src/string/memory_utils/memcmp_implementations.h
@@ -24,7 +24,7 @@ namespace __llvm_libc {
 inline_memcmp_embedded_tiny(CPtr p1, CPtr p2, size_t count) {
 #pragma nounroll
   for (size_t offset = 0; offset < count; ++offset)
-    if (auto value = generic::Memcmp<1>::block(p1 + offset, p2 + offset))
+    if (auto value = generic::Memcmp<1>::block(p1, p2))
       return value;
   return MemcmpReturnType::ZERO();
 }


        


More information about the libc-commits mailing list