[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / sse2-andnpd-1.c
blobf6eebd5d51176eddccd35f4e3c16f1d294aecd3c
1 /* { dg-do run { target le } } */
2 /* { dg-options "-O3 -mvsx -Wno-psabi" } */
3 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
4 /* { dg-require-effective-target p8vector_hw } */
6 #ifndef CHECK_H
7 #define CHECK_H "sse2-check.h"
8 #endif
10 #include CHECK_H
12 #ifndef TEST
13 #define TEST sse2_test_andnpd_1
14 #endif
16 #include <emmintrin.h>
18 static __m128d
19 __attribute__((noinline, unused))
20 test (__m128d s1, __m128d s2)
22 return _mm_andnot_pd (s1, s2);
25 static void
26 TEST (void)
28 union128d u, s1, s2;
29 long long source1[2]={34545, 95567};
30 long long source2[2]={674, 57897};
31 long long e[2];
32 double d[2];
34 s1.x = _mm_loadu_pd ((double *)source1);
35 s2.x = _mm_loadu_pd ((double *)source2);
36 u.x = test (s1.x, s2.x);
38 e[0] = (~source1[0]) & source2[0];
39 e[1] = (~source1[1]) & source2[1];
40 __builtin_memcpy (d, e, sizeof (d));
42 if (check_union128d (u, d))
43 abort ();