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/] [vrp06.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp1" } */
/* { dg-options "-O2 -fdump-tree-vrp1" } */
 
 
foo (int i, int j, int a)
foo (int i, int j, int a)
{
{
  if (i >= 10)
  if (i >= 10)
    if (i <= 30)
    if (i <= 30)
      if (i == j)
      if (i == j)
        {
        {
          a--;
          a--;
 
 
          /* This should fold to 'if (0)'.  */
          /* This should fold to 'if (0)'.  */
          if (i < 0)
          if (i < 0)
            i = baz ();
            i = baz ();
 
 
          /* This should fold to 'if (1)'.  */
          /* This should fold to 'if (1)'.  */
          if (j > 0)
          if (j > 0)
            a--;
            a--;
 
 
          /* This should fold to 'if (0)'.  */
          /* This should fold to 'if (0)'.  */
          if (i != j)
          if (i != j)
            return 0;
            return 0;
        }
        }
 
 
  return i + a + j;
  return i + a + j;
}
}
 
 
/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
/* { 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.