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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [vrp05.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining" } */
3
 
4
 
5
inline int ten()
6
{
7
  return 10;
8
}
9
inline int zero()
10
{
11
  return 0;
12
}
13
 
14
foo (int k, int j)
15
{
16
  if (k >= ten())
17
    {
18
      if (j > k)
19
        {
20
          /* We should fold this to if (1).  */
21
          if (j > zero())
22
            return j;
23
        }
24
    }
25
 
26
  return j+1;
27
}
28
 
29
/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */
30
/* { dg-final { cleanup-tree-dump "vrp1" } } */

powered by: WebSVN 2.1.0

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