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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr19590.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-ivopts" } */
3
 
4
void vnum_test8(int *data)
5
{
6
  int i;
7
  int stop = data[3];
8
  int m = data[4];
9
  int n = m;
10
  for (i=1; i<stop; i++) {
11
    int k = data[2];
12
    data[k] = 2;
13
    data[0] = m - n;
14
    k = data[1];
15
    m = m + k;
16
    n = n + k;
17
  }
18
}
19
 
20
/* Using the SCEV analysis, this loop should be transformed to:
21
 
22
   | void vnum_result8(int *data)
23
   |{
24
   |  int i;
25
   |  int stop = data[3];
26
   |  for (i=1; i<stop; i++) {
27
   |    int k = data[2];
28
   |    data[k] = 2;
29
   |    data[0] = 0;
30
   |  }
31
   |}
32
 
33
*/
34
 
35
/* { dg-final { scan-tree-dump-times "= 0;" 1 "ivopts"} } */
36
/* { dg-final { scan-tree-dump-times "= 2;" 1 "ivopts"} } */
37
/* { dg-final { cleanup-tree-dump "ivopts" } }  */

powered by: WebSVN 2.1.0

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