OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [doloop-1.c] - Rev 859

Go to most recent revision | Compare with Previous | Blame | View Log

/* Make sure both loops are recognized as doloops.
   If so, "bdnz" will be generated on ppc; if not,
   you will get "ble" or "blt" or "bge".  */
 
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-options "-O2" } */
void foo (int count, char* pca, char* pcb) {
    int i;
    if (count > 10)
        for (i = 0; i < count; ++i)
            pcb += i;
    else
        for (i = 0; i < count; ++i)
            pca += i;
    *pca = *pcb;
}
/* { dg-final { scan-assembler "bdnz" } } */
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.