Add compile command to each testcase
[gcc-vect-testsuite.git] / no-scevccp-noreassoc-outer-4.c
blobafd2bc4145dafdf85e19273d4c3c5b8c65785e10
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 40
8 __attribute__ ((noinline)) int
9 foo (){
10 int i,j;
11 int sum,s=0;
13 for (i = 0; i < 200*N; i++) {
14 sum = 0;
15 for (j = 0; j < N; j++) {
16 sum += (i + j);
17 i++;
19 s += sum;
21 return s;
24 __attribute__ ((noinline))
25 int bar (int i, int j)
27 return (i + j);
30 int main (void)
32 int i,j,k=0;
33 int sum,s=0;
34 int res;
36 check_vect ();
38 res = foo ();
40 /* check results: */
41 for (i=0; i<200*N; i++)
43 sum = 0;
44 for (j = 0; j < N; j++){
45 sum += bar (i, j);
46 i++;
48 s += sum;
50 if (res != s)
51 abort ();
53 return 0;
56 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */
57 /* { dg-final { cleanup-tree-dump "vect" } } */