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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [loop-32.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-lim-details" } */
3
 
4
int x;
5
int a[100];
6
 
7
struct a
8
{
9
  int X;
10
  int Y;
11
};
12
 
13
void bla(void);
14
 
15
void test1(void)
16
{
17
  unsigned i;
18
 
19
  /* We should perform store motion here.  */
20
  for (x = 0; x < 100; x++)
21
    a[x] = x;
22
}
23
 
24
void test2(void)
25
{
26
  unsigned i;
27
 
28
  /* But not here.  */
29
  for (x = 0; x < 100; x++)
30
    bla ();
31
}
32
 
33
void test3(struct a *A)
34
{
35
  unsigned i;
36
 
37
  /* But we should here (using base + offset analysis).  */
38
  for (i = 0; i < 100; i++)
39
    {
40
      A[5].X += i;
41
      A[5].Y += i;
42
    }
43
}
44
 
45
/* { dg-final { scan-tree-dump-times "Executing store motion of" 3 "lim1" } } */
46
/* { dg-final { cleanup-tree-dump "lim\[1-2\]" } } */

powered by: WebSVN 2.1.0

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