URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
|
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
|
|
|
struct X { int i; };
|
struct X { int i; };
|
|
|
int foo (int x)
|
int foo (int x)
|
{
|
{
|
struct X a;
|
struct X a;
|
struct X b;
|
struct X b;
|
struct X *p;
|
struct X *p;
|
a.i = 1;
|
a.i = 1;
|
b.i = 2;
|
b.i = 2;
|
if (x)
|
if (x)
|
p = &a;
|
p = &a;
|
else
|
else
|
p = &b;
|
p = &b;
|
return p->i;
|
return p->i;
|
}
|
}
|
|
|
/* We should eliminate the load from p for a PHI node with values 1 and 2. */
|
/* We should eliminate the load from p for a PHI node with values 1 and 2. */
|
|
|
/* { dg-final { scan-tree-dump "Eliminated: 1" "pre" } } */
|
/* { dg-final { scan-tree-dump "Eliminated: 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.