Commit bddb9bb1 by Kirill Yukhin Committed by Kirill Yukhin

Replace __popcntq with two _popcnt32.

gcc/testsuite/
	* gcc.target/i386/avx512f-vpcompressb-2.c: Fix popcnt for 64b case.

From-SVN: r255292
parent 1d1e69e9
2016-11-17 Kirill Yukhin <kirill.yukhin@gmail.com>
* gcc.target/i386/avx512f-vpcompressb-2.c: Fix popcnt for 32-bit mode.
2017-12-01 Jakub Jelinek <jakub@redhat.com>
PR c/83222
......
......@@ -4,7 +4,7 @@
/* { dg-require-effective-target avx512vbmi2 } */
#define AVX512F
#include <stdio.h>
#define AVX512VBMI2
#include "avx512f-helper.h"
......@@ -47,7 +47,8 @@ TEST (void)
// Swt
if (AVX512F_LEN == 512)
mask_bit_count = __popcntq(mask);
mask_bit_count = _popcnt32((int)(mask & (((long long)1 << 32) - 1)))
+ _popcnt32((int)((long long)mask >> 32));
else
mask_bit_count = __popcntd(mask);
compressed_mask = ((long long)1 << mask_bit_count) - 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment