[libcxx-commits] [libcxx] [libc++] Enable algorithm vectorization on arm neon (PR #128873)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 28 04:39:26 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Nikolas Klauser (philnik777)
<details>
<summary>Changes</summary>
Previously the wrong detection macro has been used to check whether arm NEON is available. This fixes it, and removes a few unnecessary includes from `__algorithm/simd_utils.h` as a drive-by.
---
Full diff: https://github.com/llvm/llvm-project/pull/128873.diff
1 Files Affected:
- (modified) libcxx/include/__algorithm/simd_utils.h (+1-3)
``````````diff
diff --git a/libcxx/include/__algorithm/simd_utils.h b/libcxx/include/__algorithm/simd_utils.h
index 4e03723a32854..e3c790998e902 100644
--- a/libcxx/include/__algorithm/simd_utils.h
+++ b/libcxx/include/__algorithm/simd_utils.h
@@ -15,8 +15,6 @@
#include <__bit/countr.h>
#include <__config>
#include <__cstddef/size_t.h>
-#include <__type_traits/is_arithmetic.h>
-#include <__type_traits/is_same.h>
#include <__utility/integer_sequence.h>
#include <cstdint>
@@ -78,7 +76,7 @@ using __get_as_integer_type_t _LIBCPP_NODEBUG = typename __get_as_integer_type_i
# if defined(__AVX__) || defined(__MVS__)
template <class _Tp>
inline constexpr size_t __native_vector_size = 32 / sizeof(_Tp);
-# elif defined(__SSE__) || defined(__ARM_NEON__)
+# elif defined(__SSE__) || defined(__ARM_NEON)
template <class _Tp>
inline constexpr size_t __native_vector_size = 16 / sizeof(_Tp);
# elif defined(__MMX__)
``````````
</details>
https://github.com/llvm/llvm-project/pull/128873
More information about the libcxx-commits
mailing list