URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
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" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.