| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3" } */ |
| 3 |
/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */ |
| 4 |
|
| 5 |
#include <arm_neon.h> |
| 6 |
#include <math.h> |
| 7 |
|
| 8 |
/* |
| 9 |
** f1: |
| 10 |
** ... |
| 11 |
** ld1w z[0-9]+.s, p[0-9]+/z, \[x0, x2, lsl 2\] |
| 12 |
** orr z[0-9]+.s, z[0-9]+.s, #0x80000000 |
| 13 |
** st1w z[0-9]+.s, p[0-9]+, \[x0, x2, lsl 2\] |
| 14 |
** ... |
| 15 |
*/ |
| 16 |
void f1 (float32_t *a, int n) |
| 17 |
{ |
| 18 |
for (int i = 0; i < (n & -8); i++) |
| 19 |
a[i] = -fabsf (a[i]); |
| 20 |
} |
| 21 |
|
| 22 |
/* |
| 23 |
** f2: |
| 24 |
** ... |
| 25 |
** ld1d z[0-9]+.d, p[0-9]+/z, \[x0, x2, lsl 3\] |
| 26 |
** orr z[0-9]+.d, z[0-9]+.d, #0x8000000000000000 |
| 27 |
** st1d z[0-9]+.d, p[0-9]+, \[x0, x2, lsl 3\] |
| 28 |
** ... |
| 29 |
*/ |
| 30 |
void f2 (float64_t *a, int n) |
| 31 |
{ |
| 32 |
for (int i = 0; i < (n & -8); i++) |
| 33 |
a[i] = -fabs (a[i]); |
| 34 |
} |