]> git.ipfire.org Git - thirdparty/gcc.git/commit
Avoid minimum - 1 confusion in vectoriser
authorRichard Sandiford <richard.sandiford@linaro.org>
Mon, 3 Jul 2017 16:30:43 +0000 (16:30 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 3 Jul 2017 16:30:43 +0000 (16:30 +0000)
commit80be3333236f4fcb03e15811d4b8487a604bf866
tree7006103ac2e8bee34e40994c44f7f22d07c0ec3d
parentbe58770875623c5c92a4b6af7027c67568d4c061
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.

From-SVN: r249927
gcc/ChangeLog
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c