Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr26449-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msse2 -mtune=k8" } */
3
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__);
7
8 void sse2_test (void)
9 {
10 union
11 {
12 __m128i x;
13 } val1, res[8], tmp;
14 short ins[8] = { 8, 5, 9, 4, 2, 6, 1, 20 };
15 int i;
16
17 for (i = 0; i < 8; i++)
18 {
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);
22 }
23 }