URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 338 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O1 -fdump-tree-optimized" } */
|
/* { dg-options "-O1 -fdump-tree-optimized" } */
|
|
|
struct A
|
struct A
|
{
|
{
|
int a,b;
|
int a,b;
|
};
|
};
|
|
|
int foo (int x, int y)
|
int foo (int x, int y)
|
{
|
{
|
int i, j;
|
int i, j;
|
struct A a,b;
|
struct A a,b;
|
|
|
a.a = x;
|
a.a = x;
|
b.b = y;
|
b.b = y;
|
j = a.a;
|
j = a.a;
|
i = b.b;
|
i = b.b;
|
return i + j;
|
return i + j;
|
}
|
}
|
|
|
/* The addition should be optimized into 'y+x'. */
|
/* The addition should be optimized into 'y+x'. */
|
/* { dg-final { scan-tree-dump-times "\[xy\]_..D. \\+ \[xy]_..D." 1 "optimized"} } */
|
/* { dg-final { scan-tree-dump-times "\[xy\]_..D. \\+ \[xy]_..D." 1 "optimized"} } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.