| 1 |
/* PR tree-optimization/91723 */ |
| 2 |
/* { dg-do compile { target { scalar_all_fma || { i?86-*-* x86_64-*-* } } } } */ |
| 3 |
/* { dg-additional-options "-mfma" { target { i?86-*-* x86_64-*-* } } } */ |
| 4 |
|
| 5 |
void |
| 6 |
foo (double *restrict r, const double *restrict a, |
| 7 |
const double *restrict b, const double *restrict c) |
| 8 |
{ |
| 9 |
for (int i = 0; i < 1024; i++) |
| 10 |
{ |
| 11 |
double x = __builtin_fma (a[i], b[i], c[i]); |
| 12 |
x = __builtin_fma (a[i], b[i], x); |
| 13 |
r[i] = x; |
| 14 |
} |
| 15 |
} |
| 16 |
|
| 17 |
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" { target vect_double } } } */ |