2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse-cvtsi2ss-1.c
blob740227feef464824b47086713454d0a2db1faac0
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 p, int b)
21 return _mm_cvtsi32_ss (p, b);
24 static void
25 TEST (void)
27 union128 u, s1;
28 int b = 498;
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 ();