diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr48678.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr48678.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr48678.c b/gcc/testsuite/gcc.target/i386/pr48678.c new file mode 100644 index 000000000..6f6727fff --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr48678.c @@ -0,0 +1,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); +} |