| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mavx512bw -mavx512vl -O2" } */ |
| 3 |
/* { dg-final { scan-assembler-times "vpermi2w\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ |
| 4 |
/* { dg-final { scan-assembler-times "vpermi2w\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ |
| 5 |
/* { dg-final { scan-assembler-times "vpermi2w\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ |
| 6 |
|
| 7 |
#include <immintrin.h> |
| 8 |
|
| 9 |
volatile __m512i x3; |
| 10 |
volatile __m256i x2; |
| 11 |
volatile __m128i x1; |
| 12 |
volatile __m512i z; |
| 13 |
volatile __m256i y; |
| 14 |
volatile __m128i x; |
| 15 |
volatile __mmask32 m3; |
| 16 |
volatile __mmask16 m2; |
| 17 |
volatile __mmask8 m1; |
| 18 |
|
| 19 |
void extern |
| 20 |
avx512bw_test (void) |
| 21 |
{ |
| 22 |
x3 = _mm512_mask2_permutex2var_epi16 (x3, z, m3, x3); |
| 23 |
x2 = _mm256_mask2_permutex2var_epi16 (x2, y, m2, x2); |
| 24 |
x1 = _mm_mask2_permutex2var_epi16 (x1, x, m1, x1); |
| 25 |
} |