URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 318 |
Rev 384 |
/* PR opt/6722 */
|
/* PR opt/6722 */
|
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-options "-O2" } */
|
/* { dg-options "-O2" } */
|
|
|
#if !__PIC__
|
#if !__PIC__
|
register int k asm("%ebx");
|
register int k asm("%ebx");
|
#elif __amd64
|
#elif __amd64
|
register int k asm("%r12");
|
register int k asm("%r12");
|
#else
|
#else
|
register int k asm("%esi");
|
register int k asm("%esi");
|
#endif
|
#endif
|
|
|
void __attribute__((noinline))
|
void __attribute__((noinline))
|
foo()
|
foo()
|
{
|
{
|
k = 1;
|
k = 1;
|
}
|
}
|
|
|
void test()
|
void test()
|
{
|
{
|
int i;
|
int i;
|
for (i = 0; i < 10; i += k)
|
for (i = 0; i < 10; i += k)
|
{
|
{
|
k = 0;
|
k = 0;
|
foo();
|
foo();
|
}
|
}
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
int old = k;
|
int old = k;
|
test();
|
test();
|
k = old;
|
k = old;
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.