2018-01-16 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-fast-math-vect16.c
blob2445d605534cc096d6f9a0c560ef961aa29db433
1 /* { dg-require-effective-target vect_float } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
7 #define DIFF 240
9 __attribute__ ((noinline))
10 int main1 ()
12 int i;
13 float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
14 float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
15 float diff;
17 diff = 0;
18 for (i = 0; i < N; i++) {
19 diff += (b[i] - c[i]);
22 /* check results: */
23 if (diff != DIFF)
24 abort ();
26 return 0;
29 int main (void)
31 check_vect ();
33 return main1 ();
36 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
37 /* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 1 "vect" } } */