2 /* { dg-options "-O2 -mavx512dq -DAVX512DQ" } */
3 /* { dg-require-effective-target avx512dq } */
5 #include "avx512f-helper.h"
7 #define SIZE (AVX512F_LEN / 64)
8 #include "avx512f-mask-type.h"
12 CALC (double *s1
, double *s2
, double *r
)
16 for (i
= 0; i
< SIZE
; i
++)
20 else if (s1
[i
] > s2
[i
])
30 UNION_TYPE (AVX512F_LEN
, d
) s1
, s2
, res1
, res2
, res3
;
31 MASK_TYPE mask
= MASK_VALUE
;
35 for (i
= 0; i
< SIZE
; i
++)
37 s1
.a
[i
] = 234.567 * i
* sign
;
38 s2
.a
[i
] = 100 * (i
+ 1);
39 res2
.a
[i
] = DEFAULT_VALUE
;
43 res1
.x
= INTRINSIC (_range_pd
) (s1
.x
, s2
.x
, IMM
);
44 res2
.x
= INTRINSIC (_mask_range_pd
) (res2
.x
, mask
, s1
.x
, s2
.x
, IMM
);
45 res3
.x
= INTRINSIC (_maskz_range_pd
) (mask
, s1
.x
, s2
.x
, IMM
);
47 CALC (s1
.a
, s2
.a
, res_ref
);
49 if (UNION_CHECK (AVX512F_LEN
, d
) (res1
, res_ref
))
52 MASK_MERGE (d
) (res_ref
, mask
, SIZE
);
53 if (UNION_CHECK (AVX512F_LEN
, d
) (res2
, res_ref
))
56 MASK_ZERO (d
) (res_ref
, mask
, SIZE
);
57 if (UNION_CHECK (AVX512F_LEN
, d
) (res3
, res_ref
))