Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / sse-addps-1.c
blobb280667b5d03aa7d6f77405adba4d4f99b83be8f
1 /* { dg-do run } */
2 /* { dg-options "-O2 -msse" } */
3 /* { dg-require-effective-target sse } */
5 #ifndef CHECK_H
6 #define CHECK_H "sse-check.h"
7 #endif
9 #ifndef TEST
10 #define TEST sse_test
11 #endif
13 #include CHECK_H
15 #include <xmmintrin.h>
17 static __m128
18 __attribute__((noinline, unused))
19 test (__m128 s1, __m128 s2)
21 return _mm_add_ps (s1, s2);
24 static void
25 TEST (void)
27 union128 u, s1, s2;
28 float e[4];
29 int i;
31 s1.x = _mm_set_ps (24.43, 68.346, 43.35, 546.46);
32 s2.x = _mm_set_ps (1.17, 2.16, 3.15, 4.14);
33 u.x = test (s1.x, s2.x);
35 for (i = 0; i < 4; i++)
36 e[i] = s1.a[i] + s2.a[i];
38 if (check_union128 (u, e))
39 abort ();