Revert "[libc] Fix embedded version of bcmp / memcmp"
authorGuillaume Chatelet <gchatelet@google.com>
Fri, 14 Oct 2022 13:21:19 +0000 (13:21 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Fri, 14 Oct 2022 13:21:19 +0000 (13:21 +0000)
This reverts commit 7c9b8fa6d2d921569a1ebeb4816edb7b05a37cdd.

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

index 9d9ad2b..2b74464 100644 (file)
@@ -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();
 }
index af85afa..faddebc 100644 (file)
@@ -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();
 }