[libcxx-commits] [libcxx] 1a6f9fd - [libc++] Enable algorithm vectorization on arm neon (#128873)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 28 04:38:55 PST 2025


Author: Nikolas Klauser
Date: 2025-02-28T13:38:52+01:00
New Revision: 1a6f9fd87f34b01a7aa22b4ae3a6126a1c227a53

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

LOG: [libc++] Enable algorithm vectorization on arm neon (#128873)

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.

Added: 
    

Modified: 
    libcxx/include/__algorithm/simd_utils.h

Removed: 
    


################################################################################
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__)


        


More information about the libcxx-commits mailing list