summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr26449-1.c
blob: b4ef7804887712f672b89d155dd5e30de6efe281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -msse2 -mtune=k8" } */

typedef short __v8hi __attribute__ ((__vector_size__ (16)));
typedef long long __m128i __attribute__ ((__vector_size__ (16)));

void sse2_test (void)
{
  union
  {
    __m128i x;
  } val1, res[8], tmp;
  short ins[8] = { 8, 5, 9, 4, 2, 6, 1, 20 };
  int i;

  for (i = 0; i < 8; i++)
    {
      tmp.x = val1.x;
      if (memcmp (&tmp, &res[i], sizeof (tmp)))
        (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi) val1.x, ins[i], 0);
    }
}