Skip to content

Commit

Permalink
re PR tree-optimization/57511 (Missing SCEV final value replacement)
Browse files Browse the repository at this point in the history
2013-09-02  Richard Biener  <[email protected]>

	PR middle-end/57511
	* tree-scalar-evolution.c (instantiate_scev_name): Allow
	non-linear SCEVs.

	* gcc.dg/tree-ssa/sccp-1.c: New testcase.

From-SVN: r202168
  • Loading branch information
rguenth authored and Richard Biener committed Sep 2, 2013
1 parent 78de233 commit 63fdb7b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2013-09-02 Richard Biener <[email protected]>

PR middle-end/57511
* tree-scalar-evolution.c (instantiate_scev_name): Allow
non-linear SCEVs.

2013-09-02 Richard Biener <[email protected]>

* tree-affine.c (add_elt_to_tree): Avoid converting all pointer
Expand Down
5 changes: 5 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2013-09-02 Richard Biener <[email protected]>

PR middle-end/57511
* gcc.dg/tree-ssa/sccp-1.c: New testcase.

2013-09-02 Richard Biener <[email protected]>

* gcc.dg/tree-ssa/loop-4.c: Adjust scan looking for one memory
Expand Down
15 changes: 15 additions & 0 deletions gcc/testsuite/gcc.dg/tree-ssa/sccp-1.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

int main(int argc, char* argv[])
{
int i, a = 0;
for (i=0; i < 10; i++)
a += i + 0xff00ff;
return a;
}

/* There should be no loop left. */

/* { dg-final { scan-tree-dump-times "goto" 0 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
1 change: 1 addition & 0 deletions gcc/tree-scalar-evolution.c
Original file line number Diff line number Diff line change
Expand Up @@ -2252,6 +2252,7 @@ instantiate_scev_name (basic_block instantiate_below,
else if (res != chrec_dont_know)
{
if (inner_loop
&& def_bb->loop_father != inner_loop
&& !flow_loop_nested_p (def_bb->loop_father, inner_loop))
/* ??? We could try to compute the overall effect of the loop here. */
res = chrec_dont_know;
Expand Down

0 comments on commit 63fdb7b

Please sign in to comment.