2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512bitalg-vpopcntw.c
blob2c49583b59731deb6f8838f8f914c2b2a95a8cc7
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mavx512bitalg -mavx512bw" } */
3 /* { dg-final { scan-assembler-times "vpopcntw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vpopcntw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vpopcntw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
7 #include <x86intrin.h>
9 extern __m512i z, z1;
11 int foo ()
13 __mmask16 msk;
14 __m512i c = _mm512_popcnt_epi16 (z);
15 asm volatile ("" : "+v" (c));
16 c = _mm512_mask_popcnt_epi16 (z, msk, z1);
17 asm volatile ("" : "+v" (c));
18 c = _mm512_maskz_popcnt_epi16 (msk, z);
19 asm volatile ("" : "+v" (c));