Commit e5b1fae4 by Jan Hubicka Committed by Jan Hubicka

* tree-vect-loop.c (vect_transform_loop): Update likely bounds.

From-SVN: r236880
parent eb897cfc
2016-05-30 Jan Hubicka <hubicka@ucw.cz> 2016-05-30 Jan Hubicka <hubicka@ucw.cz>
* tree-vect-loop.c (vect_transform_loop): Update likely bounds.
2016-05-30 Jan Hubicka <hubicka@ucw.cz>
* tree-ssa-loop-ivcanon.c (try_peel_loop): Correctly set wont_exit * tree-ssa-loop-ivcanon.c (try_peel_loop): Correctly set wont_exit
for peeled copies; avoid underflow when updating estimates; correctly for peeled copies; avoid underflow when updating estimates; correctly
scale loop profile. scale loop profile.
......
...@@ -6918,12 +6918,20 @@ vect_transform_loop (loop_vec_info loop_vinfo) ...@@ -6918,12 +6918,20 @@ vect_transform_loop (loop_vec_info loop_vinfo)
/* Reduce loop iterations by the vectorization factor. */ /* Reduce loop iterations by the vectorization factor. */
scale_loop_profile (loop, GCOV_COMPUTE_SCALE (1, vectorization_factor), scale_loop_profile (loop, GCOV_COMPUTE_SCALE (1, vectorization_factor),
expected_iterations / vectorization_factor); expected_iterations / vectorization_factor);
if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo))
&& loop->nb_iterations_upper_bound != 0) {
if (loop->nb_iterations_upper_bound != 0)
loop->nb_iterations_upper_bound = loop->nb_iterations_upper_bound - 1; loop->nb_iterations_upper_bound = loop->nb_iterations_upper_bound - 1;
if (loop->nb_iterations_likely_upper_bound != 0)
loop->nb_iterations_likely_upper_bound
= loop->nb_iterations_likely_upper_bound - 1;
}
loop->nb_iterations_upper_bound loop->nb_iterations_upper_bound
= wi::udiv_floor (loop->nb_iterations_upper_bound + 1, = wi::udiv_floor (loop->nb_iterations_upper_bound + 1,
vectorization_factor) - 1; vectorization_factor) - 1;
loop->nb_iterations_likely_upper_bound
= wi::udiv_floor (loop->nb_iterations_likely_upper_bound + 1,
vectorization_factor) - 1;
if (loop->any_estimate) if (loop->any_estimate)
{ {
......
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