[clang] [clang][x86] Fix `_mm512_popcnt_epi64` constexpr test (PR #152478)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 7 03:30:18 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-x86
Author: Pedro Lobo (pedroclobo)
<details>
<summary>Changes</summary>
The previous test incorrectly assumed 32-bit integers, leading to incorrect bit counts. This change updates the test result to assume 64-bit integers.
---
Full diff: https://github.com/llvm/llvm-project/pull/152478.diff
1 Files Affected:
- (modified) clang/test/CodeGen/X86/avx512vpopcntdq-builtins.c (+1-1)
``````````diff
diff --git a/clang/test/CodeGen/X86/avx512vpopcntdq-builtins.c b/clang/test/CodeGen/X86/avx512vpopcntdq-builtins.c
index ca8f5e482cc56..f4de0f17caacf 100644
--- a/clang/test/CodeGen/X86/avx512vpopcntdq-builtins.c
+++ b/clang/test/CodeGen/X86/avx512vpopcntdq-builtins.c
@@ -8,7 +8,7 @@ __m512i test_mm512_popcnt_epi64(__m512i __A) {
// CHECK: @llvm.ctpop.v8i64
return _mm512_popcnt_epi64(__A);
}
-TEST_CONSTEXPR(match_v8di(_mm512_popcnt_epi64((__m512i)(__v8di){+5, -3, -10, +8, 0, -256, +256, -128}), 2, 31, 30, 1, 0, 24, 1, 25));
+TEST_CONSTEXPR(match_v8di(_mm512_popcnt_epi64((__m512i)(__v8di){+5, -3, -10, +8, 0, -256, +256, -128}), 2, 63, 62, 1, 0, 56, 1, 57));
__m512i test_mm512_mask_popcnt_epi64(__m512i __W, __mmask8 __U, __m512i __A) {
// CHECK-LABEL: @test_mm512_mask_popcnt_epi64
``````````
</details>
https://github.com/llvm/llvm-project/pull/152478
More information about the cfe-commits
mailing list