1 /* { dg-do run } */
2 /* { dg-options "-O3 -mpower8-vector" } */
3 /* { dg-require-effective-target p8vector_hw } */
4
5 #define NO_WARN_X86_INTRINSICS 1
6
7 #ifndef CHECK_H
8 #define CHECK_H "sse-check.h"
9 #endif
10
11 #include CHECK_H
12
13 #ifndef TEST
14 #define TEST sse_test_cvtss2si_2
15 #endif
16
17 #include <xmmintrin.h>
18 #include <smmintrin.h>
19
20 static long long
21 __attribute__((noinline, unused))
22 test (__m128 p)
23 {
24 return _mm_cvtss_si64 (p);
25 }
26
27 static void
28 TEST (void)
29 {
30 union128 s1;
31 long long d;
32 long long e;
33 union {
34 float f;
35 int i;
36 } u;
37
38 s1.x = _mm_set_ps (344.4, 68.346, 43.35, 429496729501.4);
39 d = test (s1.x);
40
41 u.i = _mm_extract_ps (s1.x, 0);
42 e = u.f;
43
44 if (e != d)
45 abort ();
46 }