PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr26449-1.c
blob47849d3d0de0b8fcce10ff5c7c105d8c10ad3293
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msse2 -mtune=k8" } */
4 typedef short __v8hi __attribute__ ((__vector_size__ (16)));
5 typedef long long __m128i __attribute__ ((__vector_size__ (16)));
6 extern int memcmp (const void *, const void *, __SIZE_TYPE__);
8 void sse2_test (void)
10 union
12 __m128i x;
13 } val1, res[8], tmp;
14 short ins[8] = { 8, 5, 9, 4, 2, 6, 1, 20 };
15 int i;
17 for (i = 0; i < 8; i++)
19 tmp.x = val1.x;
20 if (memcmp (&tmp, &res[i], sizeof (tmp)))
21 (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi) val1.x, ins[i], 0);