2 /* { dg-options "-mavx512f -O2" } */
3 /* { dg-require-effective-target avx512f } */
5 #define SIZE (128 / 64)
8 #include "avx512f-check.h"
11 compute_rndscalesd (double *s1
, double *s2
, double *r
, int imm
)
19 case _MM_FROUND_FLOOR
:
20 r
[0] = floor (s2
[0] * pow (2, m
)) / pow (2, m
);
23 r
[0] = ceil (s2
[0] * pow (2, m
)) / pow (2, m
);
36 int imm
= _MM_FROUND_FLOOR
| (7 << 4);
37 union128d s1
, s2
, res1
;
40 s1
.x
= _mm_set_pd (4.05084, -1.23162);
41 s2
.x
= _mm_set_pd (-3.53222, 7.33527);
43 res1
.x
= _mm_roundscale_sd (s1
.x
, s2
.x
, imm
);
45 compute_rndscalesd (s1
.a
, s2
.a
, res_ref
, imm
);
47 if (check_union128d (res1
, res_ref
))