Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-outer-9.c
blobe0031274f1bd1d099f456e372e6c195d25177718
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" } } */