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/] [pr19431.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-optimized" } */
3
 
4
/* We want this optimized as
5
<bb 2>:
6
  if (k != 0) goto <L2>; else goto <L3>;
7
 
8
<L3>:;
9
  i1 = j1;
10
 
11
<L2>:;
12
  return i1;
13
 
14
  This requires that i1 and j1 are changed into registers after they
15
  no longer have their address taken.  */
16
 
17
int f(int k, int i1, int j1)
18
{
19
  int *f1;
20
  if(k)
21
   f1 = &i1;
22
  else
23
   f1 = &j1;
24
  return *f1;
25
}
26
 
27
/* { dg-final { scan-tree-dump "i1_. = PHI <i1_\[^,\]*, j1_\[^>\]*>" "optimized" } } */
28
/* { dg-final { scan-tree-dump "return i1_.;" "optimized" } } */
29
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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