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-dse-5.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 "-O2 -fdump-tree-optimized" } */
3
 
4
int x;
5
 
6
int
7
f1 (int i, int j, int k)
8
{
9
  int *p = k ? &i : &j;
10
  i = 3;
11
  *p = 5;
12
  x = j;
13
}
14
 
15
/* The assignment "i = 3" is partialy dead.  Our DSE pass doesn't handle
16
   detection of partially dead assignments.
17
 
18
   There's two outputs which would indicate that the optimization was
19
   performed.
20
 
21
   If we used block copying to detect and eliminate the partially dead
22
   store, then we should see an assignment "i = 5" somewhere in the
23
   dump file.
24
 
25
   Another approach would be to redirect the path from the true arm
26
   of the first conditional so that it reaches the statement *p = 5
27
   rather than i = 3.  */
28
 
29
/* { dg-final { scan-tree-dump-times "i = 5" 1 "optimized" { xfail *-*-* }} } */
30
/* { dg-final { scan-tree-dump-times "<L.*>:;\[\n\t \]*\\*p = 5" 1 "optimized" { xfail *-*-*}} } */
31
 
32
/* { dg-final { cleanup-tree-dump "optimized" } } */
33
 

powered by: WebSVN 2.1.0

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