[clang] [clang][powerpc][wasm][systemz][x86] Replace target vector popcount intrinsics with __builtin_elementwise_popcount (PR #109160)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 18 08:36:27 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 67518a44fec0f59b2f926059cf15ec77ec72da13 79002b2854e36e911b371a0b738fac0bc0dbb888 --extensions h,cpp -- clang/lib/CodeGen/CGBuiltin.cpp clang/lib/Headers/altivec.h clang/lib/Headers/avx512bitalgintrin.h clang/lib/Headers/avx512vlbitalgintrin.h clang/lib/Headers/avx512vpopcntdqintrin.h clang/lib/Headers/avx512vpopcntdqvlintrin.h clang/lib/Headers/vecintrin.h clang/lib/Headers/wasm_simd128.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Headers/avx512bitalgintrin.h b/clang/lib/Headers/avx512bitalgintrin.h
index 13693838b9..4fceb26a31 100644
--- a/clang/lib/Headers/avx512bitalgintrin.h
+++ b/clang/lib/Headers/avx512bitalgintrin.h
@@ -23,7 +23,7 @@
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_popcnt_epi16(__m512i __A)
{
- return (__m512i)__builtin_elementwise_popcount((__v32hi) __A);
+ return (__m512i)__builtin_elementwise_popcount((__v32hi)__A);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
@@ -45,7 +45,7 @@ _mm512_maskz_popcnt_epi16(__mmask32 __U, __m512i __B)
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_popcnt_epi8(__m512i __A)
{
- return (__m512i)__builtin_elementwise_popcount((__v64qi) __A);
+ return (__m512i)__builtin_elementwise_popcount((__v64qi)__A);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
diff --git a/clang/lib/Headers/avx512vlbitalgintrin.h b/clang/lib/Headers/avx512vlbitalgintrin.h
index ace6300626..2484ef7119 100644
--- a/clang/lib/Headers/avx512vlbitalgintrin.h
+++ b/clang/lib/Headers/avx512vlbitalgintrin.h
@@ -27,7 +27,7 @@
static __inline__ __m256i __DEFAULT_FN_ATTRS256
_mm256_popcnt_epi16(__m256i __A)
{
- return (__m256i)__builtin_elementwise_popcount((__v16hi) __A);
+ return (__m256i)__builtin_elementwise_popcount((__v16hi)__A);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS256
@@ -49,7 +49,7 @@ _mm256_maskz_popcnt_epi16(__mmask16 __U, __m256i __B)
static __inline__ __m128i __DEFAULT_FN_ATTRS128
_mm_popcnt_epi16(__m128i __A)
{
- return (__m128i)__builtin_elementwise_popcount((__v8hi) __A);
+ return (__m128i)__builtin_elementwise_popcount((__v8hi)__A);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS128
@@ -71,7 +71,7 @@ _mm_maskz_popcnt_epi16(__mmask8 __U, __m128i __B)
static __inline__ __m256i __DEFAULT_FN_ATTRS256
_mm256_popcnt_epi8(__m256i __A)
{
- return (__m256i)__builtin_elementwise_popcount((__v32qi) __A);
+ return (__m256i)__builtin_elementwise_popcount((__v32qi)__A);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS256
@@ -93,7 +93,7 @@ _mm256_maskz_popcnt_epi8(__mmask32 __U, __m256i __B)
static __inline__ __m128i __DEFAULT_FN_ATTRS128
_mm_popcnt_epi8(__m128i __A)
{
- return (__m128i)__builtin_elementwise_popcount((__v16qi) __A);
+ return (__m128i)__builtin_elementwise_popcount((__v16qi)__A);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS128
``````````
</details>
https://github.com/llvm/llvm-project/pull/109160
More information about the cfe-commits
mailing list