[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / sse-movmskps-1.c
blob8b621ffa0f546cbba4e0baefccfb0a49c09fb836
1 /* { dg-do run } */
2 /* { dg-options "-O3 -mvsx" } */
3 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
4 /* { dg-require-effective-target p8vector_hw } */
6 #define NO_WARN_X86_INTRINSICS 1
8 #ifndef CHECK_H
9 #define CHECK_H "sse-check.h"
10 #endif
12 #include CHECK_H
14 #ifndef TEST
15 #define TEST sse_test_movmskps_1
16 #endif
18 #include <xmmintrin.h>
20 static int
21 __attribute__((noinline, unused))
22 test (__m128 a)
24 return _mm_movemask_ps (a);
27 static void
28 TEST (void)
30 union128 u;
31 float s[4] = {-2134.3343, 1234.635654, 1.2234, -876.8976};
32 int d;
33 int e = 0;
34 int i;
36 u.x = _mm_loadu_ps (s);
37 d = test (u.x);
39 for (i = 0; i < 4; i++)
40 if (s[i] < 0)
41 e |= (1 << i);
43 if (checkVi (&d, &e, 1))
44 abort ();