aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pr48678.c
blob: 6f6727fffa2a6beb437ce3302e028a3aee3d0b02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* PR target/48678 */
/* { dg-do compile } */
/* { dg-options "-O2 -msse2" } */

#include <emmintrin.h>

typedef short T __attribute__((may_alias));
struct S { __m128i d; };

__m128i
foo (short *x, struct S *y, __m128i *z)
{
  struct S s = *y;
  ((T *) &s.d)[0] = *x;
  return _mm_cmpeq_epi16 (s.d, *z);
}