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 } */
11 #define CHECK_H "sse2-check.h"
17 #define TEST sse2_test_addsd_1
20 #include <emmintrin.h>
23 __attribute__((noinline
, unused
))
24 test (__m128d s1
, __m128d s2
)
26 __asm("" : "+v"(s1
), "+v"(s2
));
27 return _mm_add_sd (s1
, s2
);
36 s1
.x
= _mm_set_pd (2134.3343,1234.635654);
37 s2
.x
= _mm_set_pd (41124.234,2344.2354);
38 u
.x
= test (s1
.x
, s2
.x
);
40 e
[0] = s1
.a
[0] + s2
.a
[0];
43 if (check_union128d (u
, e
))
46 printf ("sse2_test_addsd_1; check_union128d failed\n");
47 printf ("\t [%f,%f] + [%f,%f] -> [%f,%f]\n", s1
.a
[0], s1
.a
[1], s2
.a
[0],
48 s2
.a
[1], u
.a
[0], u
.a
[1]);
49 printf ("\t expect [%f,%f]\n", e
[0], e
[1]);