PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-noreassoc-outer-1.c
blob82b37d4ca71344d15e00e0453dae6470c8d5ba9b
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 (){
12 int i,j,k=0;
13 int sum,x;
15 for (i = 0; i < N; i++) {
16 sum = 0;
17 for (j = 0; j < N; j++) {
18 sum += (i + j);
19 i++;
21 a[k++] = sum;
25 int main (void)
27 int i,j,k=0;
28 int sum;
30 check_vect ();
32 foo ();
34 /* check results: */
35 for (i=0; i<N; i++)
37 sum = 0;
38 for (j = 0; j < N; j++){
39 sum += (j + i);
40 i++;
42 if (a[k++] != sum)
43 abort();
46 return 0;
49 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail *-*-* } } } */