PR target/55146
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-outer-11.c
blob16b0cc0c361816a6c0e8bd881f4a0817522b4e0f
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 n){
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;
24 int main (void)
26 int i,j;
27 int sum;
29 check_vect ();
31 for (i=0; i<N; i++)
32 a[i] = i;
34 foo (N);
36 /* check results: */
37 for (i=0; i<N; i++)
39 sum = 0;
40 for (j = 0; j < N; j++)
41 sum += j;
42 if (a[i] != sum)
43 abort();
46 return 0;
49 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail *-*-* } } } */
50 /* { dg-final { cleanup-tree-dump "vect" } } */