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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-fre-15.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details" } */
3
 
4
/* Should be optimized, propagating &a into (*p)[i].  */
5
 
6
struct Foo
7
{
8
  void *data;
9
  double size;
10
};
11
void bar(double *);
12
void foo(double (*q)[4])
13
{
14
  struct Foo tmp1;
15
  double a[4];
16
  int i;
17
  tmp1.data = &a;
18
  for (i=0; i<4; ++i)
19
    {
20
      double (*p)[4] = tmp1.data;
21
      (*p)[i] = (*q)[i];
22
      /* We want a PHI for the VOP for accessing tmp1.data, so place
23
         this store to tmp1 here.  */
24
      tmp1.size -= 1.0;
25
    }
26
  bar(a);
27
}
28
 
29
/* { dg-final { scan-tree-dump "Replaced" "fre" } } */
30
/* { dg-final { cleanup-tree-dump "fre" } } */

powered by: WebSVN 2.1.0

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