Commit fa519ca6 by Jan Hubicka Committed by Jan Hubicka

tree-ssa-loop-ivopts.c (avg_loop_niter): Use also max_loop_iterations_int.

	* tree-ssa-loop-ivopts.c (avg_loop_niter): Use also
	max_loop_iterations_int.

From-SVN: r235158
parent 90751aa7
2016-04-17 Jan Hubicka <jh@suse.cz>
* tree-ssa-loop-ivopts.c (avg_loop_niter): Use also
max_loop_iterations_int.
2016-04-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/43434
......
......@@ -121,7 +121,11 @@ avg_loop_niter (struct loop *loop)
{
HOST_WIDE_INT niter = estimated_stmt_executions_int (loop);
if (niter == -1)
return AVG_LOOP_NITER (loop);
{
niter = max_stmt_executions_int (loop);
if (niter == -1 || niter > AVG_LOOP_NITER (loop))
return AVG_LOOP_NITER (loop);
}
return niter;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment