[libc-commits] [libc] Include inline_strlen.h on aarch64 only if the target has vector instrucions (PR #170892)
via libc-commits
libc-commits at lists.llvm.org
Fri Dec 5 09:48:49 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: None (Sterling-Augustine)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/170892.diff
1 Files Affected:
- (modified) libc/src/string/string_length.h (+1-1)
``````````diff
diff --git a/libc/src/string/string_length.h b/libc/src/string/string_length.h
index c828c85c16a17..1dc59d0078079 100644
--- a/libc/src/string/string_length.h
+++ b/libc/src/string/string_length.h
@@ -24,7 +24,7 @@
#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
``````````
</details>
https://github.com/llvm/llvm-project/pull/170892
More information about the libc-commits
mailing list