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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-pre-1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
3
extern int printf (const char *, ...);
4
int foo(int argc, char **argv)
5
{
6
        int a;
7
        int b;
8
        int c;
9
        b  = argc + 1;
10
        c =  argc + 2;
11
        a = b + c;
12
        if (argc * 2)
13
        {
14
                c = argc + 3;
15
        }
16
        printf ("%d, %d\n", a, b + c);
17
}
18
/* We should eliminate one evaluation of b + c along the main path,
19
   causing one reload. */
20
/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre"} } */
21
/* { dg-final { cleanup-tree-dump "pre" } } */

powered by: WebSVN 2.1.0

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