| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-require-effective-target maybe_x32 } */ |
| 3 |
/* { dg-options "-mx32 -O2 -march=haswell" } */ |
| 4 |
/* { dg-final { scan-assembler-not "\tvgather" } } */ |
| 5 |
/* { dg-final { scan-assembler "addr32 vgather" } } */ |
| 6 |
|
| 7 |
typedef double __v2df __attribute__ ((__vector_size__ (16))); |
| 8 |
typedef int __v4si __attribute__ ((__vector_size__ (16))); |
| 9 |
typedef long long __v2di __attribute__ ((__vector_size__ (16))); |
| 10 |
|
| 11 |
typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); |
| 12 |
typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__)); |
| 13 |
|
| 14 |
extern __inline __m128d |
| 15 |
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) |
| 16 |
_mm_i32gather_pd (double const *__base, __m128i __index, const int __scale) |
| 17 |
{ |
| 18 |
__v2df __zero = { 0.0, 0.0 }; |
| 19 |
__v2df __mask = __builtin_ia32_cmpeqpd (__zero, __zero); |
| 20 |
__v2df x = x; |
| 21 |
|
| 22 |
return (__m128d) __builtin_ia32_gathersiv2df (x, |
| 23 |
__base, |
| 24 |
(__v4si)__index, |
| 25 |
__mask, |
| 26 |
__scale); |
| 27 |
} |
| 28 |
|
| 29 |
__m128d x; |
| 30 |
__m128i idx; |
| 31 |
|
| 32 |
void extern |
| 33 |
avx2_test (void) |
| 34 |
{ |
| 35 |
x = _mm_i32gather_pd ((void *) 0, idx, 1); |
| 36 |
} |