Use -fcf-protection=return in cet-intrin-4.c
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse4_1-set-ps-1.c
blobaab1e51a02c4cbc90083a25c00a67c28aec37012
1 /* { dg-do run } */
2 /* { dg-require-effective-target sse4 } */
3 /* { dg-options "-O2 -msse4.1" } */
5 #include "sse4_1-check.h"
7 #ifdef DEBUG
8 #include <stdio.h>
9 #endif
11 #include <xmmintrin.h>
13 static void
14 __attribute__((noinline))
15 test (float *v)
17 union
19 __m128 x;
20 float f[4];
21 } u;
22 unsigned int i;
24 u.x = _mm_set_ps (v[3], v[2], v[1], v[0]);
26 for (i = 0; i < sizeof (u) / sizeof (v[0]); i++)
27 if (v[i] != u.f[i])
29 #ifdef DEBUG
30 printf ("%i: %f != %f\n", i, v[i], u.f[i]);
31 #endif
32 abort ();
36 static void
37 sse4_1_test (void)
39 float v[4] = { -3, 2, 1, 9 };
40 test (v);