1 /* { dg-do run { target { ! ia32 } } } */
2 /* { dg-options "-mavx512f -O2" } */
3 /* { dg-require-effective-target avx512f } */
4 
5 #include "avx512f-check.h"
6 
7 static void
8   __attribute__ ((noinline, unused))
compute_vcvtusi2sd(double * s1,unsigned long long s2,double * r)9 compute_vcvtusi2sd (double *s1, unsigned long long s2, double *r)
10 {
11   r[0] = (double) s2;
12   r[1] = s1[1];
13 }
14 
15 static void
avx512f_test(void)16 avx512f_test (void)
17 {
18   union128d s1, res;
19   unsigned long long s2;
20   double res_ref[4];
21 
22   s1.x = _mm_set_pd (-24.43, -43.35);
23   s2 = 0xFEDCBA9876543210;
24 
25   res.x = _mm_cvtu64_sd (s1.x, s2);
26 
27   compute_vcvtusi2sd (s1.a, s2, res_ref);
28 
29   if (check_union128d (res, res_ref))
30     abort ();
31 }
32