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

Subversion Repositories openrisc_me

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

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 i, int j, int a)
5
{
6
  if (i >= 10)
7
    if (i <= 30)
8
      if (i == j)
9
        {
10
          a--;
11
 
12
          /* This should fold to 'if (0)'.  */
13
          if (i < 0)
14
            i = baz ();
15
 
16
          /* This should fold to 'if (1)'.  */
17
          if (j > 0)
18
            a--;
19
 
20
          /* This should fold to 'if (0)'.  */
21
          if (i != j)
22
            return 0;
23
        }
24
 
25
  return i + a + j;
26
}
27
 
28
/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
29
/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */
30
/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "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.