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/] [vrp09.c] - Blame information for rev 298

Go to most recent revision | 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)
5
{
6
  int x = baz ();
7
 
8
  if (p == 0)
9
    goto L78;
10
  else
11
    {
12
      x = *p;
13
      /* This should be folded to if (1).  */
14
      if (p)
15
        x = x + 1;
16
L78:
17
      /* This should not be folded to if (1).  */
18
      if (p)
19
        {
20
          x = baz (*p);
21
          /* This should be folded to if (1).  */
22
          if (p)
23
            return x + 3;
24
        }
25
 
26
      return x - 3;
27
    }
28
}
29
 
30
/* { dg-final { scan-tree-dump-times "Folding predicate p_.. != 0B to 1" 2 "vrp1" } } */
31
/* { 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.