OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [vrp01.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-vrp1" } */
3
 
4
foo (int *p, int i)
5
{
6
  int x;
7
 
8
  if (i > 10)
9
    {
10
      if (p)
11
        {
12
          x = *p;
13
          p = 0;
14
        }
15
    }
16
  else
17
    p = 0;
18
 
19
  /* This should be folded to if (1), but only if we insert an
20
     assertion on the ELSE edge from the inner 'if (p)'.  */
21
  if (p == 0)
22
    return x + 1;
23
 
24
  return i;
25
}
26
 
27
/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" } } */
28
/* { 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.