| 1 |
/* PR target/99754 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-options "-O2 -msse2" } */ |
| 4 |
/* { dg-require-effective-target sse2 } */ |
| 5 |
|
| 6 |
#include "sse2-check.h" |
| 7 |
#include <emmintrin.h> |
| 8 |
|
| 9 |
static void |
| 10 |
sse2_test (void) |
| 11 |
{ |
| 12 |
union { unsigned char buf[32]; long long ll; } u; |
| 13 |
u.buf[1] = 0xbe; |
| 14 |
u.buf[2] = 0xba; |
| 15 |
u.buf[3] = 0xfe; |
| 16 |
u.buf[4] = 0xca; |
| 17 |
u.buf[17] = 0xaa; |
| 18 |
u.buf[18] = 0x55; |
| 19 |
u.buf[19] = 0xaa; |
| 20 |
u.buf[20] = 0x55; |
| 21 |
_mm_storeu_si32 (&u.buf[17], _mm_loadu_si32 (&u.buf[1])); |
| 22 |
if (u.buf[17] != 0xbe || u.buf[18] != 0xba || u.buf[19] != 0xfe || u.buf[20] != 0xca) |
| 23 |
abort (); |
| 24 |
} |