From: Kirill Yukhin Date: Fri, 1 Dec 2017 06:25:26 +0000 (+0000) Subject: Replace __popcntq with two _popcnt32. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bddb9bb1c7c4b7c7973ddde13c4f52121db923ea;p=gcc.git Replace __popcntq with two _popcnt32. gcc/testsuite/ * gcc.target/i386/avx512f-vpcompressb-2.c: Fix popcnt for 64b case. From-SVN: r255292 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 74211182335..66ca1d2d315 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2016-11-17 Kirill Yukhin + + * gcc.target/i386/avx512f-vpcompressb-2.c: Fix popcnt for 32-bit mode. + 2017-12-01 Jakub Jelinek PR c/83222 diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcompressb-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressb-2.c index bd1fb451413..4f159630504 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vpcompressb-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressb-2.c @@ -4,7 +4,7 @@ /* { dg-require-effective-target avx512vbmi2 } */ #define AVX512F - +#include #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;