1 /* { dg-do compile } */
2 /* { dg-options "-mavx512f -mavx512vbmi2 -mavx512bw -O2" } */
3 /* { dg-final { scan-assembler-times "vpshrdvw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vpshrdvw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vpshrdvw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vpshrdvd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vpshrdvd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vpshrdvd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
9 /* { dg-final { scan-assembler-times "vpshrdvq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
10 /* { dg-final { scan-assembler-times "vpshrdvq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
11 /* { dg-final { scan-assembler-times "vpshrdvq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
12 
13 
14 
15 #include <immintrin.h>
16 
17 volatile __m512i x,y,z,z1;
18 volatile __mmask32 m32;
19 volatile __mmask16 m16;
20 volatile __mmask8 m8;
21 
22 void extern
avx512f_test(void)23 avx512f_test (void)
24 {
25   x = _mm512_shrdv_epi16 (x, y, z);
26   x = _mm512_mask_shrdv_epi16 (x, m32, y, z);
27   x = _mm512_maskz_shrdv_epi16 (m32, x, y, z);
28 
29   x = _mm512_shrdv_epi32 (x, y, z);
30   x = _mm512_mask_shrdv_epi32 (x, m16, y, z);
31   x = _mm512_maskz_shrdv_epi32 (m16, x, y, z);
32 
33   x = _mm512_shrdv_epi64 (x, y, z);
34   x = _mm512_mask_shrdv_epi64 (x, m8, y, z);
35   x = _mm512_maskz_shrdv_epi64 (m8, x, y, z);
36 }
37