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 #ifndef CHECK_H 7 #define CHECK_H "mmx-check.h" 8 #endif 9 10 #ifndef TEST 11 #define TEST mmx_test 12 #endif 13 14 #define N 0xb 15 16 #include CHECK_H 17 18 #include <mmintrin.h> 19 20 static __m64 21 __attribute__((noinline, unused)) test(__m64 s1)22test (__m64 s1) 23 { 24 return _mm_sra_pi32 (s1, N); 25 } 26 27 static void TEST(void)28TEST (void) 29 { 30 __m64_union u, s1; 31 __m64_union e; 32 int i; 33 34 s1.as_m64 = _mm_setr_pi32 (1000, -20000); 35 u.as_m64 = test (s1.as_m64); 36 37 if (N < 16) 38 for (i = 0; i < 2; i++) 39 e.as_int[i] = s1.as_int[i] >> N; 40 41 if (u.as_m64 != e.as_m64) 42 abort (); 43 } 44