PR target/55146
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-outer-8.c
blobafa5b3d241e9ad19fb2abe171d4a1c2ad172cb0d
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 40
9 __attribute__ ((noinline)) int
10 foo (int *a){
11 int i,j;
12 int sum;
14 for (i = 0; i < N; i++) {
15 sum = 0;
16 for (j = 0; j < N; j++) {
17 sum += j;
19 a[i] = sum;
23 int main (void)
25 int i,j;
26 int sum;
27 int a[N];
29 check_vect ();
31 for (i=0; i<N; i++)
32 a[i] = i;
34 foo (a);
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 { ! { vect_element_align } } } } } */
50 /* { dg-final { cleanup-tree-dump "vect" } } */