2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
7 #include "avx512f-helper.h"
9 #define SIZE (AVX512F_LEN / 64)
10 #include "avx512f-mask-type.h"
14 CALC (double *r
, double *s1
, double *s2
)
17 for (i
= 0; i
< SIZE
; i
++)
19 r
[i
] = ldexp (s1
[i
], floor (s2
[i
]));
27 UNION_TYPE (AVX512F_LEN
, d
) res1
, res2
, res3
, src1
, src2
;
28 MASK_TYPE mask
= MASK_VALUE
;
32 for (i
= 0; i
< SIZE
; i
++)
34 src1
.a
[i
] = 1.5 + 34.67 * i
* sign
;
35 src2
.a
[i
] = -22.17 * i
* sign
;
38 for (i
= 0; i
< SIZE
; i
++)
39 res2
.a
[i
] = DEFAULT_VALUE
;
41 res1
.x
= INTRINSIC (_scalef_pd
) (src1
.x
, src2
.x
);
42 res2
.x
= INTRINSIC (_mask_scalef_pd
) (res2
.x
, mask
, src1
.x
, src2
.x
);
43 res3
.x
= INTRINSIC (_maskz_scalef_pd
) (mask
, src1
.x
, src2
.x
);
45 CALC (res_ref
, src1
.a
, src2
.a
);
47 if (UNION_CHECK (AVX512F_LEN
, d
) (res1
, res_ref
))
50 MASK_MERGE (d
) (res_ref
, mask
, SIZE
);
51 if (UNION_CHECK (AVX512F_LEN
, d
) (res2
, res_ref
))
54 MASK_ZERO (d
) (res_ref
, mask
, SIZE
);
55 if (UNION_CHECK (AVX512F_LEN
, d
) (res3
, res_ref
))