1 /* { dg-do compile } */
2 /* { dg-options "-mavx512dq -O2" } */
3 /* { dg-final { scan-assembler-times "vreducess\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4
5 /* { dg-final { scan-assembler-times "vreducess\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vreducess\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vreducess\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
8
9 #include <immintrin.h>
10
11 #define IMM 123
12
13 volatile __m128 x1, x2;
14 volatile __mmask8 m;
15
16 void extern
avx512dq_test(void)17 avx512dq_test (void)
18 {
19 x1 = _mm_reduce_ss (x1, x2, IMM);
20
21 x1 = _mm_mask_reduce_ss (x1, m, x1, x2, IMM);
22
23 x1 = _mm_maskz_reduce_ss (m, x1, x2, IMM);
24 }
25