2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-Ofast -mavx -mno-avx2" } */
6 #define CHECK_H "avx-check.h"
8 #define SRC "avx-vround-1.c"
21 if (f1 (0.5) != 1.0 || f1 (1.5) != 2.0 || f1 (-0.5) != -1.0 || f1 (-1.5) != -2.0)
23 if (f2 (0.5f
) != 1.0f
|| f2 (1.5f
) != 2.0f
|| f2 (-0.5f
) != -1.0f
|| f2 (-1.5f
) != -2.0f
)
25 a
.x
= f3 (_mm_set1_pd (7.0), _mm_set1_pd (0.5));
26 ae
.x
= _mm_set_pd (7.0, 0.0);
27 if (check_union128d (a
, ae
.a
))
29 a
.x
= f3 (_mm_set1_pd (7.0), _mm_set1_pd (1.5));
30 ae
.x
= _mm_set_pd (7.0, 2.0);
31 if (check_union128d (a
, ae
.a
))
33 a
.x
= f3 (_mm_set1_pd (7.0), _mm_set1_pd (-0.5));
34 ae
.x
= _mm_set_pd (7.0, 0.0);
35 if (check_union128d (a
, ae
.a
))
37 a
.x
= f3 (_mm_set1_pd (7.0), _mm_set1_pd (-1.5));
38 ae
.x
= _mm_set_pd (7.0, -2.0);
39 if (check_union128d (a
, ae
.a
))
41 b
.x
= f4 (_mm_set1_ps (7.0f
), _mm_set1_ps (0.5f
));
42 be
.x
= _mm_set_ps (7.0f
, 7.0f
, 7.0f
, 0.0f
);
43 if (check_union128 (b
, be
.a
))
45 b
.x
= f4 (_mm_set1_ps (7.0f
), _mm_set1_ps (1.5f
));
46 be
.x
= _mm_set_ps (7.0f
, 7.0f
, 7.0f
, 2.0f
);
47 if (check_union128 (b
, be
.a
))
49 b
.x
= f4 (_mm_set1_ps (7.0f
), _mm_set1_ps (-0.5f
));
50 be
.x
= _mm_set_ps (7.0f
, 7.0f
, 7.0f
, 0.0f
);
51 if (check_union128 (b
, be
.a
))
53 b
.x
= f4 (_mm_set1_ps (7.0f
), _mm_set1_ps (-1.5f
));
54 be
.x
= _mm_set_ps (7.0f
, 7.0f
, 7.0f
, -2.0f
);
55 if (check_union128 (b
, be
.a
))
57 a
.x
= f5 (_mm_set_pd (0.5, 1.5));
58 ae
.x
= _mm_set_pd (0.0, 2.0);
59 if (check_union128d (a
, ae
.a
))
61 a
.x
= f5 (_mm_set_pd (-0.5, -1.5));
62 ae
.x
= _mm_set_pd (0.0, -2.0);
63 if (check_union128d (a
, ae
.a
))
65 b
.x
= f6 (_mm_set_ps (0.5f
, 1.5f
, -0.5f
, -1.5f
));
66 be
.x
= _mm_set_ps (0.0f
, 2.0f
, 0.0f
, -2.0f
);
67 if (check_union128 (b
, be
.a
))
69 c
.x
= f7 (_mm256_set_pd (0.5, 1.5, -0.5, -1.5));
70 ce
.x
= _mm256_set_pd (0.0, 2.0, 0.0, -2.0);
71 if (check_union256d (c
, ce
.a
))
73 d
.x
= f8 (_mm256_set_ps (0.5f
, 1.5f
, -0.5f
, -1.5f
, 0.25f
, 1.0f
, -16.5f
, 0.75f
));
74 de
.x
= _mm256_set_ps (0.0f
, 2.0f
, 0.0f
, -2.0f
, 0.0f
, 1.0f
, -16.0f
, 1.0f
);
75 if (check_union256 (d
, de
.a
))