re PR tree-optimization/57511 (Missing SCEV final value replacement)

2013-09-02  Richard Biener  <rguenther@suse.de>

	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
This commit is contained in:
Richard Biener 2013-09-02 13:24:30 +00:00 committed by Richard Biener
parent 78de2333ea
commit 63fdb7bee7
4 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2013-09-02 Richard Biener <rguenther@suse.de>
PR middle-end/57511
* tree-scalar-evolution.c (instantiate_scev_name): Allow
non-linear SCEVs.
2013-09-02 Richard Biener <rguenther@suse.de>
* tree-affine.c (add_elt_to_tree): Avoid converting all pointer

View File

@ -1,3 +1,8 @@
2013-09-02 Richard Biener <rguenther@suse.de>
PR middle-end/57511
* gcc.dg/tree-ssa/sccp-1.c: New testcase.
2013-09-02 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/loop-4.c: Adjust scan looking for one memory

View File

@ -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" } } */

View File

@ -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;