1 /* { dg-do compile } */
2 /* { dg-options "-mavx512dq -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
4 /* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 3 } } */
5 /* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 3 } } */
6 /* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
7 /* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
8 /* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
9 /* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
10 /* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
11 /* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
13 #include <immintrin.h>
20 volatile __mmask16 m16
;
26 x1
= _mm512_reduce_ps (x1
, IMM
);
27 x2
= _mm256_reduce_ps (x2
, IMM
);
28 x3
= _mm_reduce_ps (x3
, IMM
);
30 x1
= _mm512_mask_reduce_ps (x1
, m16
, x1
, IMM
);
31 x2
= _mm256_mask_reduce_ps (x2
, m8
, x2
, IMM
);
32 x3
= _mm_mask_reduce_ps (x3
, m8
, x3
, IMM
);
34 x1
= _mm512_maskz_reduce_ps (m16
, x1
, IMM
);
35 x2
= _mm256_maskz_reduce_ps (m8
, x2
, IMM
);
36 x3
= _mm_maskz_reduce_ps (m8
, x3
, IMM
);