Add compile command to each testcase
[gcc-vect-testsuite.git] / fast-math-vect-reduc-8.c
blob43a55f3a1d0f29c6ed3e28a9557c4a6dbf28475c
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_float } */
4 #include "tree-vect.h"
6 extern float x[128] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7 extern float y[128] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
8 extern float z[128] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
10 float f (unsigned n)
12 float ret = 0.0;
13 unsigned i;
14 for (i = 0; i < n; i++)
16 float diff = x[i] - y[i];
17 ret -= diff * diff * z[i];
19 return ret;
22 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
23 /* { dg-final { cleanup-tree-dump "vect" } } */