re PR middle-end/55555 (miscompilation at -O2 (number_of_iterations))
authorRichard Biener <rguenther@suse.de>
Tue, 18 Dec 2012 13:12:34 +0000 (13:12 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 18 Dec 2012 13:12:34 +0000 (13:12 +0000)
commit8b679c9b242fe694269439e3e8be166a5e2d7dc9
tree4097eac3f8bd34e5c316b801522cc85d298958a3
parent898be2f38dd5832034f726feab95661f589ec007
re PR middle-end/55555 (miscompilation at -O2 (number_of_iterations))

2012-12-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/55555
* tree-ssa-loop-niter.c (idx_infer_loop_bounds): Properly
analyze evolution of the index for the loop it is used in.
* tree-scalar-evolution.c (instantiate_scev_name): Take
inner loop we will be creating a chrec for.  Generalize
fix for PR40281 and prune invalid SCEVs.
(instantiate_scev_poly): Likewise - pass down inner loop
we will be creating a chrec for.
(instantiate_scev_binary): Take and pass through inner loop.
(instantiate_array_ref): Likewise.
(instantiate_scev_convert): Likewise.
(instantiate_scev_not): Likewise.
(instantiate_scev_3): Likewise.
(instantiate_scev_2): Likewise.
(instantiate_scev_1): Likewise.
(instantiate_scev_r): Likewise.
(resolve_mixers): Adjust.
(instantiate_scev): Likewise.

* gcc.dg/torture/pr55555.c: New testcase.
* gcc.dg/vect/vect-iv-11.c: Adjust.

From-SVN: r194578
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr55555.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-iv-11.c
gcc/tree-scalar-evolution.c
gcc/tree-ssa-loop-niter.c