[committed] ft32 doesn't support trampolines.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse4_1-pmovzxwd.c
blobb525f4c6ae611425a394276af27c74438b76b44f
1 /* { dg-do run } */
2 /* { dg-require-effective-target sse4 } */
3 /* { dg-options "-O2 -msse4.1" } */
5 #ifndef CHECK_H
6 #define CHECK_H "sse4_1-check.h"
7 #endif
9 #ifndef TEST
10 #define TEST sse4_1_test
11 #endif
13 #include CHECK_H
15 #include <smmintrin.h>
17 #define NUM 128
19 static void
20 TEST (void)
22 union
24 __m128i x[NUM / 4];
25 unsigned int i[NUM];
26 unsigned short s[NUM * 2];
27 } dst, src;
28 int i;
30 for (i = 0; i < NUM; i++)
32 src.s[(i % 4) + (i / 4) * 8] = i * i;
33 if ((i % 4))
34 src.s[(i % 4) + (i / 4) * 8] |= 0x8000;
37 for (i = 0; i < NUM; i += 4)
38 dst.x [i / 4] = _mm_cvtepu16_epi32 (src.x [i / 4]);
40 for (i = 0; i < NUM; i++)
41 if (src.s[(i % 4) + (i / 4) * 8] != dst.i[i])
42 abort ();