re PR tree-optimization/77536 (Vectorizer not maintaining relationship of relative...
authorBin Cheng <bin.cheng@arm.com>
Mon, 27 Feb 2017 10:20:36 +0000 (10:20 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Mon, 27 Feb 2017 10:20:36 +0000 (10:20 +0000)
commit57fa080bf6c0ae01bf1643a87e72ca636bde0454
treef43af4a14ba4560b5196a61c743280e98d08cc5a
parent68b948d3ba7cee54ba9f03a5b04f505f9c7538ff
re PR tree-optimization/77536 (Vectorizer not maintaining relationship of relative block frequencies in absence of real profile data)

PR tree-optimization/77536
* tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
(tree_transform_and_unroll_loop): Use above function to compute the
estimated niter of unrolled loop and use it when scaling profile.
Also use count info rather than frequency if it's non-zero.
* tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
* tree-vect-loop.c (scale_profile_for_vect_loop): New function.
(vect_transform_loop): Call above function.

gcc/testsuite
* gcc.dg/vect/pr79347.c: Revise testing string.

From-SVN: r245754
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr79347.c
gcc/tree-ssa-loop-manip.c
gcc/tree-ssa-loop-manip.h
gcc/tree-vect-loop.c