Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-outer-12.c
blob90ea32ddd9d086ddb84e2c79c9ebd2bde24cd49e
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 64
8 int a[N];
9 short b[N];
11 __attribute__ ((noinline)) int
12 foo (){
13 int i,j;
14 int sum;
16 for (i = 0; i < N; i++) {
17 sum = 0;
18 for (j = 0; j < N; j++) {
19 sum += j;
21 a[i] = sum;
22 b[i] = (short)sum;
26 int main (void)
28 int i,j;
29 int sum;
31 check_vect ();
33 foo ();
35 /* check results: */
36 for (i=0; i<N; i++)
38 sum = 0;
39 for (j = 0; j < N; j++)
40 sum += j;
41 if (a[i] != sum || b[i] != (short)sum)
42 abort();
45 return 0;
48 /* Until we support multiple types in the inner loop */
49 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail *-*-* } } } */
50 /* { dg-final { cleanup-tree-dump "vect" } } */