Add AMD SSE5 support; Add iterator over function arguments; Add stdarg_p, prototype_p...
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse4_1-pmovzxbd.c
blobe5aa7ee38849cf78710bc8edccc0fb5a3daaaa08
1 /* { dg-do run } */
2 /* { dg-require-effective-target sse4 } */
3 /* { dg-options "-O2 -msse4.1" } */
5 #include "sse4_1-check.h"
7 #include <smmintrin.h>
9 #define NUM 128
11 static void
12 sse4_1_test (void)
14 union
16 __m128i x[NUM / 4];
17 unsigned int i[NUM];
18 unsigned char c[NUM * 4];
19 } dst, src;
20 int i;
22 for (i = 0; i < NUM; i++)
24 src.c[(i % 4) + (i / 4) * 16] = i * i;
25 if ((i % 4))
26 src.c[(i % 4) + (i / 4) * 16] |= 0x80;
29 for (i = 0; i < NUM; i += 4)
30 dst.x [i / 4] = _mm_cvtepu8_epi32 (src.x [i / 4]);
32 for (i = 0; i < NUM; i++)
33 if (src.c[(i % 4) + (i / 4) * 16] != dst.i[i])
34 abort ();