gcc/testsuite/gcc.dg/vect/vect-fma-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-additional-options "-fdump-tree-optimized -fassociative-math -fno-trapping-math -fno-signed-zeros" } */ |
| 3 | |
| 4 | #include "tree-vect.h" |
| 5 | |
| 6 | #define N (VECTOR_BITS * 11 / 64 + 3) |
| 7 | |
| 8 | double |
| 9 | dot_prod (double *x, double *y) |
| 10 | { |
| 11 | double sum = 0; |
| 12 | for (int i = 0; i < N; ++i) |
| 13 | sum += x[i] * y[i]; |
| 14 | return sum; |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-tree-dump { = \.COND_FMA } "optimized" { target { vect_double && { vect_fully_masked && scalar_all_fma } } } } } */ |