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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [inline-4.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 "-Os -c -fdump-ipa-inline -fno-early-inlining -fno-partial-inlining -fno-ipa-cp"  } */
3
 
4
void do_something (int shall_i_work)
5
{
6
  if (shall_i_work)
7
    {
8
      work_hard ();
9
      work_hard ();
10
      work_hard ();
11
      work_hard ();
12
      work_hard ();
13
      work_hard ();
14
      work_hard ();
15
      work_hard ();
16
    }
17
}
18
int foo (int invariant)
19
{
20
  do_something (0);
21
  do_something (1);
22
}
23
 
24
 
25
/* We should inline do_something(0),  but not do_something (1).  */
26
/* { dg-final { scan-ipa-dump "Inlined 1 calls, eliminated 0 functions"  "inline"  } } */
27
/* Call to work_hard should be detected as optimized out.  */
28
/* { dg-final { scan-ipa-dump-times "predicate: .false." 8 "inline"  } } */
29
/* { dg-final { cleanup-ipa-dump "inline" } } */

powered by: WebSVN 2.1.0

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