PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse-15.c
blob5a1da7a755fd06d5682d3573b0fea3c6544e0864
1 /* { dg-do compile } */
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);