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/] [loadpre17.c] - Diff between revs 816 and 826

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

Rev 816 Rev 826
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
typedef int type[2];
typedef int type[2];
int foo(type *a, int argc)
int foo(type *a, int argc)
{
{
  int d, e;
  int d, e;
 
 
  /* Should be able to eliminate the second load of *a along the main path. */
  /* Should be able to eliminate the second load of *a along the main path. */
  d = (*a)[argc];
  d = (*a)[argc];
  if (argc)
  if (argc)
      a++;
      a++;
  e = (*a)[argc];
  e = (*a)[argc];
  return d + e;
  return d + e;
}
}
/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre"} } */
/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
 
 

powered by: WebSVN 2.1.0

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