OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ltrans-1.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* { dg-do compile } */
2
/* { dg-options "-O2 -ftree-loop-linear -fdump-tree-ltrans-all" } */
3
 
4
double u[1782225];
5
int foo(int N, int *res)
6
{
7
  int i, j;
8
  double sum = 0.0;
9
  /* This loop should be converted to a perfect nest and
10
     interchanged. */
11
  for (i = 0; i < N; i++)
12
    {
13
      for (j = 0; j < N; j++)
14
        sum = sum + u[i + 1335 * j];
15
 
16
      u[1336 * i] *= 2;
17
    }
18
  *res = sum + N;
19
}
20
/* { dg-final { scan-tree-dump-times "converted loop nest to perfect
21
   loop nest" 1 "ltrans"} } */
22
/* { dg-final { scan-tree-dump-times "transformed loop" 1 "ltrans"} } */
23
/* { dg-final { cleanup-tree-dump "ltrans" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.