| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-Ofast" } */ |
| 3 |
/* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */ |
| 4 |
|
| 5 |
/* |
| 6 |
** f1: |
| 7 |
** ... |
| 8 |
** fneg z[0-9]+.d, p[0-9]+/m, z[0-9]+.d |
| 9 |
** fadd z[0-9]+.s, z[0-9]+.s, z[0-9]+.s |
| 10 |
** ... |
| 11 |
*/ |
| 12 |
void f1 (float *restrict a, float *restrict b, float *res, int n) |
| 13 |
{ |
| 14 |
for (int i = 0; i < (n & -4); i+=2) |
| 15 |
{ |
| 16 |
res[i+0] = a[i+0] + b[i+0]; |
| 17 |
res[i+1] = a[i+1] - b[i+1]; |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
/* |
| 22 |
** d1: |
| 23 |
** ... |
| 24 |
** fneg z[0-9]+.s, p[0-9]+/m, z[0-9]+.s |
| 25 |
** fadd z[0-9]+.h, z[0-9]+.h, z[0-9]+.h |
| 26 |
** ... |
| 27 |
*/ |
| 28 |
void d1 (_Float16 *restrict a, _Float16 *restrict b, _Float16 *res, int n) |
| 29 |
{ |
| 30 |
for (int i = 0; i < (n & -8); i+=2) |
| 31 |
{ |
| 32 |
res[i+0] = a[i+0] + b[i+0]; |
| 33 |
res[i+1] = a[i+1] - b[i+1]; |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
/* |
| 38 |
** e1: |
| 39 |
** ... |
| 40 |
** fsub z[0-9]+.d, z[0-9]+.d, z[0-9]+.d |
| 41 |
** movprfx z[0-9]+.d, p[0-9]+/m, z[0-9]+.d |
| 42 |
** fadd z[0-9]+.d, p[0-9]+/m, z[0-9]+.d, z[0-9]+.d |
| 43 |
** ... |
| 44 |
*/ |
| 45 |
void e1 (double *restrict a, double *restrict b, double *res, int n) |
| 46 |
{ |
| 47 |
for (int i = 0; i < (n & -4); i+=2) |
| 48 |
{ |
| 49 |
res[i+0] = a[i+0] + b[i+0]; |
| 50 |
res[i+1] = a[i+1] - b[i+1]; |
| 51 |
} |
| 52 |
} |