Commit 72769217 by Richard Biener Committed by Richard Biener

tree-ssa-loop-ch.c (copy_loop_headers): Decrement nb_iterations_upper_bound by one.

2013-11-21  Richard Biener  <rguenther@suse.de>

	* tree-ssa-loop-ch.c (copy_loop_headers): Decrement
	nb_iterations_upper_bound by one.

From-SVN: r205198
parent d995e887
2013-11-21 Richard Biener <rguenther@suse.de> 2013-11-21 Richard Biener <rguenther@suse.de>
* tree-ssa-loop-ch.c (copy_loop_headers): Decrement
nb_iterations_upper_bound by one.
2013-11-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/59058 PR tree-optimization/59058
* tree-loop-distribution.c (struct partition_s): Add plus_one * tree-loop-distribution.c (struct partition_s): Add plus_one
member. member.
...@@ -243,6 +243,16 @@ copy_loop_headers (void) ...@@ -243,6 +243,16 @@ copy_loop_headers (void)
are not now, since there was the loop exit condition. */ are not now, since there was the loop exit condition. */
split_edge (loop_preheader_edge (loop)); split_edge (loop_preheader_edge (loop));
split_edge (loop_latch_edge (loop)); split_edge (loop_latch_edge (loop));
/* We peeled off one iteration of the loop thus we can lower
the maximum number of iterations if we have a previously
recorded value for that. */
double_int max;
if (get_max_loop_iterations (loop, &max))
{
max -= double_int_one;
loop->nb_iterations_upper_bound = max;
}
} }
update_ssa (TODO_update_ssa); update_ssa (TODO_update_ssa);
......
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