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] - Blame information for rev 859

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

Line No. Rev Author Line
1 322 jeremybenn
/* Make sure both loops are recognized as doloops.
2
   If so, "bdnz" will be generated on ppc; if not,
3
   you will get "ble" or "blt" or "bge".  */
4
 
5
/* { dg-do compile { target powerpc*-*-* } } */
6
/* { dg-options "-O2" } */
7
void foo (int count, char* pca, char* pcb) {
8
    int i;
9
    if (count > 10)
10
        for (i = 0; i < count; ++i)
11
            pcb += i;
12
    else
13
        for (i = 0; i < count; ++i)
14
            pca += i;
15
    *pca = *pcb;
16
}
17
/* { dg-final { scan-assembler "bdnz" } } */

powered by: WebSVN 2.1.0

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