Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/sse2-andnpd-1.c

raw
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 } */
5
6 #ifndef CHECK_H
7 #define CHECK_H "sse2-check.h"
8 #endif
9
10 #include CHECK_H
11
12 #ifndef TEST
13 #define TEST sse2_test_andnpd_1
14 #endif
15
16 #include <emmintrin.h>
17
18 static __m128d
19 __attribute__((noinline, unused))
20 test (__m128d s1, __m128d s2)
21 {
22 return _mm_andnot_pd (s1, s2);
23 }
24
25 static void
26 TEST (void)
27 {
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];
33
34 s1.x = _mm_loadu_pd ((double *)source1);
35 s2.x = _mm_loadu_pd ((double *)source2);
36 u.x = test (s1.x, s2.x);
37
38 e[0] = (~source1[0]) & source2[0];
39 e[1] = (~source1[1]) & source2[1];
40 __builtin_memcpy (d, e, sizeof (d));
41
42 if (check_union128d (u, d))
43 abort ();
44 }