IVOPT performance tuning patch. The main problem is a variant of maximal weight
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-outer-19.c
blob58bcf0870f590ff66ec602ea219442f3c0d1471e
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 64
8 unsigned short a[N];
9 unsigned int b[N];
11 __attribute__ ((noinline)) int
12 foo (){
13 unsigned short i,j;
14 unsigned short 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] = (unsigned int)sum;
26 int main (void)
28 int i,j;
29 short sum;
31 check_vect ();
33 for (i=0; i<N; i++)
34 a[i] = i;
36 foo ();
38 /* check results: */
39 for (i=0; i<N; i++)
41 sum = 0;
42 for (j = 0; j < N; j++)
43 sum += j;
44 if (a[i] != sum || b[i] != (unsigned int)sum)
45 abort();
48 return 0;
51 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { ! {vect_unpack } } } } } */
52 /* { dg-final { cleanup-tree-dump "vect" } } */