2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx-vtestpd-1.c
bloba00d3e68cb37f6b67e0e0d520cca68a78dc8369c
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
5 #include "avx-check.h"
7 static void
8 avx_test ()
10 int i;
11 union128d source1, source2;
13 double s1[2] = {30, -5463};
14 double s2[2] = {20, 1223};
15 int d[1];
16 int e[1];
18 source1.x = _mm_loadu_pd(s1);
19 source2.x = _mm_loadu_pd(s2);
21 d[0] = _mm_testz_pd(source1.x, source2.x);
23 e[0] = 1;
24 for (i = 0; i < 2; i++)
26 union ieee754_double u1, u2;
27 u1.d = s1[i];
28 u2.d = s2[i];
29 if (u1.bits.sign && u2.bits.sign) {
30 e[0] = 0;
34 if (checkVi(d, e, 1))
35 abort ();