Avoid minimum - 1 confusion in vectoriser
commitba12948e0cf210a028004322880fdd69af1505e8
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Jul 2017 16:30:43 +0000 (3 16:30 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Jul 2017 16:30:43 +0000 (3 16:30 +0000)
tree7006103ac2e8bee34e40994c44f7f22d07c0ec3d
parent29c7bda6b3d26d480af366f0fea6f9f5fb2a6cf0
Avoid minimum - 1 confusion in vectoriser

The variables that claimed to be the "minimum number of iterations" for
which vectorisation was profitable were actually the maximum number of
iterations for which vectorisation wasn't profitable.  The loop threshold
was too.

This patch makes the values be what the variable names suggest.

2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
min_profitable_iters, and th as inclusive lower bounds.
Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
(vect_estimate_min_profitable_iters): Return inclusive lower bounds
for min_profitable_iters and min_profitable_estimate.
(vect_transform_loop): Treat th as an inclusive lower bound.
* tree-vect-loop-manip.c (vect_loop_versioning): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249927 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c