| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -mavx" } */ |
| 3 |
/* { dg-final { scan-assembler "\tvmovdqa\t" } } */ |
| 4 |
/* { dg-final { scan-assembler "\tvmovdqu\t" } } */ |
| 5 |
/* { dg-final { scan-assembler "\tvmovapd\t" } } */ |
| 6 |
/* { dg-final { scan-assembler "\tvmovupd\t" } } */ |
| 7 |
/* { dg-final { scan-assembler-not "\tvmovaps\t" } } */ |
| 8 |
/* { dg-final { scan-assembler-not "\tvmovups\t" } } */ |
| 9 |
|
| 10 |
#include <immintrin.h> |
| 11 |
|
| 12 |
void |
| 13 |
foo1 (__m128i *p, __m128i x) |
| 14 |
{ |
| 15 |
*p = x; |
| 16 |
} |
| 17 |
|
| 18 |
void |
| 19 |
foo2 (__m128d *p, __m128d x) |
| 20 |
{ |
| 21 |
*p = x; |
| 22 |
} |
| 23 |
|
| 24 |
void |
| 25 |
foo3 (__float128 *p, __float128 x) |
| 26 |
{ |
| 27 |
*p = x; |
| 28 |
} |
| 29 |
|
| 30 |
void |
| 31 |
foo4 (__m128i_u *p, __m128i x) |
| 32 |
{ |
| 33 |
*p = x; |
| 34 |
} |
| 35 |
|
| 36 |
void |
| 37 |
foo5 (__m128d_u *p, __m128d x) |
| 38 |
{ |
| 39 |
*p = x; |
| 40 |
} |
| 41 |
|
| 42 |
typedef __float128 __float128_u __attribute__ ((__aligned__ (1))); |
| 43 |
|
| 44 |
void |
| 45 |
foo6 (__float128_u *p, __float128 x) |
| 46 |
{ |
| 47 |
*p = x; |
| 48 |
} |
| 49 |
|
| 50 |
#ifdef __x86_64__ |
| 51 |
typedef __int128 __int128_u __attribute__ ((__aligned__ (1))); |
| 52 |
|
| 53 |
extern __int128 int128; |
| 54 |
|
| 55 |
void |
| 56 |
foo7 (__int128 *p) |
| 57 |
{ |
| 58 |
*p = int128; |
| 59 |
} |
| 60 |
|
| 61 |
void |
| 62 |
foo8 (__int128_u *p) |
| 63 |
{ |
| 64 |
*p = int128; |
| 65 |
} |
| 66 |
#endif |