Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / sse2-movsd-3.c
blob57a5c23ae1c15cf752b2586e6e394db6a6279cf8
1 /* { dg-do run } */
2 /* { dg-options "-O3 -mpower8-vector -Wno-psabi" } */
3 /* { dg-require-effective-target lp64 } */
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_movsd_3
14 #endif
16 #include <emmintrin.h>
18 static __m128d
19 __attribute__((noinline, unused))
20 test (__m128d a, __m128d b)
22 __asm("" : "+v"(a), "+v"(b));
23 return _mm_move_sd (a, b);
26 static void
27 TEST (void)
29 union128d u, s1, s2;
30 double e[2] = { 256.046, 3345.1234 };
32 s1.x = _mm_setr_pd (128.023, 3345.1234);
33 s2.x = _mm_setr_pd (256.046, 4533.1234);
34 __asm("" : "+v"(s1.x), "+v"(s2.x));
35 u.x = test (s1.x, s2.x);
37 if (check_union128d (u, e))
38 #if DEBUG
40 printf ("sse2_test_movsd_3; check_union128d failed\n");
41 printf ("\t [%f,%f], [%f,%f] -> [%f,%f]\n", s1.a[0], s1.a[1], s2.a[0],
42 s2.a[1], u.a[0], u.a[1]);
43 printf ("\t expect [%f,%f]\n", e[0], e[1]);
45 #else
46 abort ();
47 #endif