blob: 246f925eede1b88e1cf16a1fd7d8712869107690 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O2 -mavx512bitalg -mavx512bw" } */
/* { dg-final { scan-assembler-times "vpopcntb\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpopcntb\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpopcntb\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <x86intrin.h>
extern __m512i z, z1;
int foo ()
{
__mmask16 msk;
__m512i c = _mm512_popcnt_epi8 (z);
asm volatile ("" : "+v" (c));
c = _mm512_mask_popcnt_epi8 (z1, msk, z);
asm volatile ("" : "+v" (c));
c = _mm512_maskz_popcnt_epi8 (msk, z);
asm volatile ("" : "+v" (c));
}