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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-dce-3.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-cddce1" } */
3
 
4
int main(void)
5
{
6
  unsigned i, j;
7
 
8
  for (i = 1, j = 0; i != 0; i+=2)
9
    {
10
      j += 500;
11
      if (j % 7)
12
        {
13
          j++;
14
        }
15
      else
16
        {
17
          j--;
18
        }
19
    }
20
 
21
  return 0;
22
}
23
 
24
/* We should eliminate the inner condition, but the loop must be preserved
25
   as it is infinite.  Therefore there should be just one phi node (for i):  */
26
/* { dg-final { scan-tree-dump-times "PHI " 1 "cddce1"} } */
27
 
28
/* And one if (for the exit condition of the loop):  */
29
/* { dg-final { scan-tree-dump-times "if " 1 "cddce1"} } */
30
 
31
/* { dg-final { cleanup-tree-dump "cddce1" } } */

powered by: WebSVN 2.1.0

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