[Bug tree-optimization/49218] Incorrect optimization of a 'for' loop creates an infinite loop
mikpe at it dot uu.se
gcc-bugzilla@gcc.gnu.org
Mon May 30 09:03:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49218
--- Comment #8 from Mikael Pettersson <mikpe at it dot uu.se> 2011-05-30 09:00:46 UTC ---
Triggered by r163724:
Author: rguenth
Date: Wed Sep 1 11:39:55 2010
New Revision: 163724
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163724
Log:
2010-09-01 Richard Guenther <rguenther@suse.de>
* tree-vrp.c (adjust_range_with_scev): Use number of iteration
estimate.
(vrp_visit_phi_node): Delay using SCEV till we balloon the
range.
(execute_vrp): Compute number of iteration estimates.
* cfgloop.h (estimate_numbers_of_iterations_loop): Adjust prototype.
* tree-flow.h (estimate_numbers_of_iterations): Likewise.
* tree-data-ref.c (estimated_loop_iterations): Adjust.
* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
Infer loop bounds from undefined behavior based on a new
parameter.
(estimate_numbers_of_iterations): Likewise.
(scev_probably_wraps_p): Adjust.
* tree-ssa-loop.c (tree_ssa_loop_bounds): Likewise.
The original C++ test case stopped failing on trunk with r171450:
Author: rguenth
Date: Fri Mar 25 11:59:19 2011
New Revision: 171450
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171450
Log:
2011-03-25 Richard Guenther <rguenther@suse.de>
* passes.c (init_optimization_passes): Add FRE pass after
early SRA.
but that's accidental: the C test case still fails after this, and the C++ one
fails if compiled with -O2 -fno-tree-fre.
More information about the Gcc-bugs
mailing list