1 /* { dg-do run } */
2 /* { dg-options "-O3 -mpower8-vector" } */
3 /* { dg-require-effective-target lp64 } */
4 /* { dg-require-effective-target p8vector_hw } */
5 
6 #define NO_WARN_X86_INTRINSICS 1
7 
8 #ifndef CHECK_H
9 #define CHECK_H "sse-check.h"
10 #endif
11 
12 #include CHECK_H
13 
14 #ifndef TEST
15 #define TEST sse_test_cvttss2si_2
16 #endif
17 
18 #include <xmmintrin.h>
19 
20 static long long
21 __attribute__((noinline, unused))
test(__m128 p)22 test (__m128 p)
23 {
24   __asm("" : "+v"(p));
25   return _mm_cvttss_si64 (p);
26 }
27 
28 static void
TEST(void)29 TEST (void)
30 {
31   union128 s1;
32   long long d;
33   long long e;
34 
35   s1.x = _mm_set_ps (24.43, 68.346, 43.35, 429496729501.4);
36   d = test (s1.x);
37   e = (long long)s1.a[0];
38 
39   if (e != d)
40     abort ();
41 }
42