PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse2-movhpd-1.c
blobe906cbc2f37da82da31678bf3f0b9965820a20ca
1 /* { dg-do run } */
2 /* { dg-options "-O2 -mfpmath=sse -msse2" } */
3 /* { dg-require-effective-target sse2 } */
5 #ifndef CHECK_H
6 #define CHECK_H "sse2-check.h"
7 #endif
9 #ifndef TEST
10 #define TEST sse2_test
11 #endif
13 #include CHECK_H
15 #include <emmintrin.h>
17 static __m128d
18 __attribute__((noinline, unused))
19 test (__m128d s1, double *p)
21 return _mm_loadh_pd (s1, p);
24 static void
25 TEST (void)
27 union128d u, s1;
28 double s2[2] = {41124.234,2344.2354};
29 double e[2];
31 s1.x = _mm_set_pd (2134.3343,1234.635654);
32 u.x = test (s1.x, s2);
34 e[0] = s1.a[0];
35 e[1] = s2[0];
37 if (check_union128d (u, e))
38 abort ();