1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
4 /* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
5 /* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
6 /* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 3 } } */
7 /* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
8 /* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
9 /* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
10 /* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
11 /* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
13 #include <immintrin.h>
18 volatile __mmask32 m1
;
19 volatile __mmask16 m2
;
25 x1
= _mm512_permutexvar_epi16 (x1
, x1
);
26 x1
= _mm512_maskz_permutexvar_epi16 (m1
, x1
, x1
);
27 x1
= _mm512_mask_permutexvar_epi16 (x1
, m1
, x1
, x1
);
28 x2
= _mm256_permutexvar_epi16 (x2
, x2
);
29 x2
= _mm256_maskz_permutexvar_epi16 (m2
, x2
, x2
);
30 x2
= _mm256_mask_permutexvar_epi16 (x2
, m2
, x2
, x2
);
31 x3
= _mm_permutexvar_epi16 (x3
, x3
);
32 x3
= _mm_maskz_permutexvar_epi16 (m3
, x3
, x3
);
33 x3
= _mm_mask_permutexvar_epi16 (x3
, m3
, x3
, x3
);