re PR tree-optimization/55875 (IVopts caused miscompilation)
authorJan Hubicka <jh@suse.cz>
Wed, 9 Jan 2013 15:10:43 +0000 (16:10 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 9 Jan 2013 15:10:43 +0000 (15:10 +0000)
commit870ca331280a56f4dc9499d0046594b9bd63e7c4
treefa91e2ed4dc3c3cbb1c733cf42692146e63b1edd
parent3cd232b5aafa8b8563d3bbe4b4e240eea6b93036
re PR tree-optimization/55875 (IVopts caused miscompilation)

PR tree-optimiation/55875
* gcc.c-torture/execute/pr55875.c: New testcase.
* g++.dg/torture/pr55875.C: New testcase.

* tree-ssa-loop-niter.c (number_of_iterations_cond): Add
EVERY_ITERATION parameter.
(number_of_iterations_exit): Check if exit is executed every
iteration.
(idx_infer_loop_bounds): Similarly here.
(n_of_executions_at_most): Simplify
to only test for cases where statement is dominated by the
particular bound; handle correctly the "postdominance"
test.
(scev_probably_wraps_p): Use max loop iterations info
as a global bound first.

From-SVN: r195054
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr55875.C [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr55875.c [new file with mode: 0644]
gcc/tree-ssa-loop-niter.c