2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse-cvtsi2ss-2.c
blobd05649e3913f628c80351732bd3789444694c1c9
1 /* { dg-do run { target { ! ia32 } } } */
2 /* { dg-require-effective-target sse } */
3 /* { dg-options "-O2 -msse" } */
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 p, long long b)
21 return _mm_cvtsi64_ss (p, b);
24 static void
25 TEST (void)
27 union128 u, s1;
28 long long b = 4294967295133LL;
29 float e[4] = { 24.43, 68.346, 43.35, 546.46 };
31 s1.x = _mm_set_ps (e[3], e[2], e[1], e[0]);
32 u.x = test (s1.x, b);
33 e[0] = (float)b;
35 if (check_union128 (u, e))
36 abort ();