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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [inline-3.c] - Blame information for rev 706

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

Line No. Rev Author Line
1 689 jeremybenn
/* Verify that do_work is detected as being loop invariant.  */
2
/* { dg-do compile } */
3
/* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining"  } */
4
 
5
struct bah {int a,b,d;};
6
 
7
static int do_work (struct bah s)
8
{
9
  return s.a*s.b/s.d;
10
}
11
int foo (int invariant)
12
{
13
  int i;
14
  struct bah s = {invariant,invariant,invariant};
15
  int sum = 0;
16
  for (i = 0; i<10; i++)
17
    {
18
      sum += do_work (s);
19
    }
20
  return sum;
21
}
22
 
23
 
24
/* { dg-final { scan-ipa-dump "Scaling time by probability:0.100000"  "inline"  } } */
25
/* { 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.