[libc-commits] [libc] a1eff73 - Include inline_strlen.h on aarch64 only if the target has vector instrucions (#170892)

via libc-commits libc-commits at lists.llvm.org
Fri Dec 5 13:11:23 PST 2025


Author: Sterling-Augustine
Date: 2025-12-05T13:11:19-08:00
New Revision: a1eff73a8ef24729ee1d0f0fd639fb79403c3686

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

LOG: Include inline_strlen.h on aarch64 only if the target has vector instrucions (#170892)

Added: 
    

Modified: 
    libc/src/string/string_length.h

Removed: 
    


################################################################################
diff  --git a/libc/src/string/string_length.h b/libc/src/string/string_length.h
index c828c85c16a17..089c76b8eab96 100644
--- a/libc/src/string/string_length.h
+++ b/libc/src/string/string_length.h
@@ -24,7 +24,8 @@
 #endif
 #if defined(LIBC_TARGET_ARCH_IS_X86)
 #include "src/string/memory_utils/x86_64/inline_strlen.h"
-#elif defined(LIBC_TARGET_ARCH_IS_AARCH64)
+#elif defined(LIBC_TARGET_ARCH_IS_AARCH64) &&                                  \
+    (defined(LIBC_TARGET_CPU_HAS_SVE) || defined(__ARM_NEON))
 #include "src/string/memory_utils/aarch64/inline_strlen.h"
 #endif
 


        


More information about the libc-commits mailing list