URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 322 |
Rev 338 |
/* Make sure both loops are recognized as doloops.
|
/* Make sure both loops are recognized as doloops.
|
If so, "bdnz" will be generated on ppc; if not,
|
If so, "bdnz" will be generated on ppc; if not,
|
you will get "ble" or "blt" or "bge". */
|
you will get "ble" or "blt" or "bge". */
|
|
|
/* { dg-do compile { target powerpc*-*-* } } */
|
/* { dg-do compile { target powerpc*-*-* } } */
|
/* { dg-options "-O2" } */
|
/* { dg-options "-O2" } */
|
void foo (int count, char* pca, char* pcb) {
|
void foo (int count, char* pca, char* pcb) {
|
int i;
|
int i;
|
if (count > 10)
|
if (count > 10)
|
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
pcb += i;
|
pcb += i;
|
else
|
else
|
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
pca += i;
|
pca += i;
|
*pca = *pcb;
|
*pca = *pcb;
|
}
|
}
|
/* { dg-final { scan-assembler "bdnz" } } */
|
/* { dg-final { scan-assembler "bdnz" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.