IVOPT performance tuning patch. The main problem is a variant of maximal weight
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-outer-15.c
blobb90167675b7f9c6352e3ef676489f5b8233d913e
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 40
8 int a[N];
10 __attribute__ ((noinline)) int
11 foo (int x){
12 int i,j;
13 int sum;
15 for (i = 0; i < N; i++) {
16 sum = 0;
17 for (j = 0; j < N; j++) {
18 sum += j;
20 a[i] = sum + i + x;
24 int main (void)
26 int i,j;
27 int sum;
28 int aa[N];
30 check_vect ();
32 foo (3);
34 /* check results: */
35 for (i=0; i<N; i++)
37 sum = 0;
38 for (j = 0; j < N; j++)
39 sum += j;
40 if (a[i] != sum + i + 3)
41 abort();
44 return 0;
47 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */
48 /* { dg-final { cleanup-tree-dump "vect" } } */