PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx-vtestps-2.c
blob97a3a846ff831c59b8df3854d99b95bfa64773da
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
5 #include "avx-check.h"
7 static void
8 avx_test ()
10 int i;
11 union128 source1, source2;
12 float s1[4] = {0, -5463, 86456, 0};
13 float s2[4] = {0, -1223, 0, 0};
14 int d[1];
15 int e[1];
17 source1.x = _mm_loadu_ps(s1);
18 source2.x = _mm_loadu_ps(s2);
19 d[0] = _mm_testc_ps(source1.x, source2.x);
21 e[0] = 1;
22 for (i = 0; i < 4; i++) {
23 union ieee754_float u1, u2;
24 u1.d = s1[i];
25 u2.d = s2[i];
26 if (!u1.bits.sign && u2.bits.sign)
27 e[0] = 0;
30 if (checkVi (d, e, 1))
31 abort ();