1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vpmaxuw\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
4 /* { dg-final { scan-assembler-times "vpmaxuw\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
5 /* { dg-final { scan-assembler-times "vpmaxuw\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
6 /* { dg-final { scan-assembler-times "vpmaxuw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
7 /* { dg-final { scan-assembler-times "vpmaxuw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
8 /* { dg-final { scan-assembler-times "vpmaxuw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
9 /* { dg-final { scan-assembler-times "vpmaxuw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
11 #include <immintrin.h>
16 volatile __mmask32 mx
;
17 volatile __mmask16 my
;
23 x
= _mm512_max_epu16 (x
, x
);
24 x
= _mm512_mask_max_epu16 (x
, mx
, x
, x
);
25 x
= _mm512_maskz_max_epu16 (mx
, x
, x
);
26 y
= _mm256_mask_max_epu16 (y
, my
, y
, y
);
27 y
= _mm256_maskz_max_epu16 (my
, y
, y
);
28 z
= _mm_mask_max_epu16 (z
, mz
, z
, z
);
29 z
= _mm_maskz_max_epu16 (mz
, z
, z
);