* gcc.dg/const-elim-1.c: xfail for xtensa.
[official-gcc.git] / gcc / testsuite / gcc.dg / i386-sse-3.c
blob9f31cfa92f8576c4e00b0485814ccc6ddb63f43a
1 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-O2 -msse -msse2" } */
4 /* Test that the intrinsics compile with optimization. These were not
5 tested in i386-sse-[12].c because these builtins require immediate
6 operands. */
8 #include <xmmintrin.h>
10 __m128
11 test_shuf (void)
13 __m128 a = _mm_set1_ps (1.0);
14 __m128 b = _mm_set1_ps (2.0);
15 return _mm_shuffle_ps (a, b, _MM_SHUFFLE (0,1,2,3));
18 __m64
19 test_ins_ext (__m64 a)
21 return _mm_insert_pi16 (a, _mm_extract_pi16 (a, 0), 3);
24 __m64
25 test_shuf2 (__m64 a)
27 return _mm_shuffle_pi16 (a, 0xA5);
30 void
31 test_prefetch (char *p)
33 _mm_prefetch (p, _MM_HINT_T0);
34 _mm_prefetch (p+4, _MM_HINT_T1);
35 _mm_prefetch (p+8, _MM_HINT_T2);
36 _mm_prefetch (p+12, _MM_HINT_NTA);
39 __m128i
40 test__slli_si128 (__m128i a)
42 return _mm_slli_si128 (a, 3);
45 __m128i
46 test__srli_si128 (__m128i a)
48 return _mm_srli_si128 (a, 3);