| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -mavx" } */ |
| 3 |
|
| 4 |
#include <immintrin.h> |
| 5 |
|
| 6 |
static inline __m256 add1(const __m256 *a, const __m256 *b) |
| 7 |
{ |
| 8 |
return _mm256_add_ps(*a, *b); |
| 9 |
} |
| 10 |
|
| 11 |
void foo1(__m256 *a, const __m256 b) |
| 12 |
{ |
| 13 |
*a = add1(a, &b); |
| 14 |
} |
| 15 |
|
| 16 |
static inline __m128 add2(const __m128 *a, const __m128 *b) |
| 17 |
{ |
| 18 |
return _mm_add_ps(*a, *b); |
| 19 |
} |
| 20 |
|
| 21 |
void foo2(__m128 *a, const __m128 b) |
| 22 |
{ |
| 23 |
*a = add2(a, &b); |
| 24 |
} |
| 25 |
|
| 26 |
/* { dg-final { scan-assembler-not "vmovups" } } */ |