Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / sse-cvtsi2ss-2.c
blob6abc4d5afeda592de563819c59de75964da2620a
1 /* { dg-do run } */
2 /* { dg-require-effective-target lp64 } */
3 /* { dg-require-effective-target sse } */
4 /* { dg-options "-O2 -msse" } */
6 #ifndef CHECK_H
7 #define CHECK_H "sse-check.h"
8 #endif
10 #ifndef TEST
11 #define TEST sse_test
12 #endif
14 #include CHECK_H
16 #include <xmmintrin.h>
18 static __m128
19 __attribute__((noinline, unused))
20 test (__m128 p, long long b)
22 return _mm_cvtsi64_ss (p, b);
25 static void
26 TEST (void)
28 union128 u, s1;
29 long long b = 4294967295133LL;
30 float e[4] = { 24.43, 68.346, 43.35, 546.46 };
32 s1.x = _mm_set_ps (e[3], e[2], e[1], e[0]);
33 u.x = test (s1.x, b);
34 e[0] = (float)b;
36 if (check_union128 (u, e))
37 abort ();