1 /* { dg-do run { target { ! ia32 } } } */ 2 /* { dg-require-effective-target sse2 } */ 3 /* { dg-options "-O2 -msse2" } */ 4 5 #ifndef CHECK_H 6 #define CHECK_H "sse2-check.h" 7 #endif 8 9 #ifndef TEST 10 #define TEST sse2_test 11 #endif 12 13 #include CHECK_H 14 15 #include <emmintrin.h> 16 17 static long long 18 __attribute__((noinline, unused)) test(__m128d p)19test (__m128d p) 20 { 21 return _mm_cvtsd_si64 (p); 22 } 23 24 static void TEST(void)25TEST (void) 26 { 27 union128d s; 28 long long e; 29 long long d; 30 31 s.x = _mm_set_pd (829496729501.4, 429496729501.4); 32 33 d = test (s.x); 34 35 e = (long long)(s.a[0] + 0.5); 36 37 if (d != e) 38 abort (); 39 } 40