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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-fre-13.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fstrict-aliasing -fno-tree-sra -fdump-tree-fre-details" } */
3
 
4
/* Should be optimized, propagating &a into (*p)[i].  */
5
 
6
/* For this testcase we need TBAA to work.  */
7
 
8
struct Foo
9
{
10
  void *data;
11
  int size;
12
};
13
void foo(double (*q)[4], struct Foo *tmp1)
14
{
15
  double a[4];
16
  int i;
17
  tmp1->data = &a;
18
  tmp1->size = 4;
19
  for (i=0; i<4; ++i)
20
    {
21
      double (*p)[4] = tmp1->data;
22
      (*p)[i] = (*q)[i];
23
    }
24
}
25
 
26
/* { dg-final { scan-tree-dump "Inserted .* &a" "fre" } } */
27
/* { dg-final { scan-tree-dump "Replaced tmp1_.\\\(D\\\)->data" "fre" } } */
28
/* { 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.