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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [loop-5.c] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* A test for induction variable merging.  */
2
 
3
/* { dg-do compile } */
4
/* { dg-options "-O1 -fdump-tree-optimized" } */
5
 
6
void foo(long);
7
 
8
void xxx(void)
9
{
10
  long iter, jter;
11
 
12
  for (iter = 0, jter = 2; iter < 100; iter++, jter++)
13
    {
14
      foo (iter);
15
      foo (jter);
16
    }
17
}
18
 
19
/* Only iter variable should remain.  */
20
 
21
/* { dg-final { scan-tree-dump-times "int iter" 1 "optimized" } } */
22
/* { dg-final { scan-tree-dump-times "jter" 0 "optimized" } } */
23
 
24
/* And the use of jter should be replaced by iter + 2 */
25
 
26
/* { dg-final { scan-tree-dump-times " \\+ 2" 1 "optimized" } } */
27
 
28
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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