diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-01-13 17:59:23 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-01-13 17:59:23 +0000 |
commit | c2700f7466bac153def05a0e070aa78cd2ffc0ae (patch) | |
tree | 50556d047879e76735dd263eb9a0712f9066545e /gcc/params.def | |
parent | 8277ddf9eeae431d432855e41537df1c3a4fa323 (diff) | |
download | gcc-c2700f7466bac153def05a0e070aa78cd2ffc0ae.zip gcc-c2700f7466bac153def05a0e070aa78cd2ffc0ae.tar.gz gcc-c2700f7466bac153def05a0e070aa78cd2ffc0ae.tar.bz2 |
Allow the number of iterations to be smaller than VF
Fully-masked loops can be profitable even if the iteration
count is smaller than the vectorisation factor. In this case
we're effectively doing a complete unroll followed by SLP.
The documentation for min-vect-loop-bound says that the
default value was 0, but actually the default and minimum
were 1. We need it to be 0 for this case since the parameter
counts a whole number of vector iterations.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* doc/sourcebuild.texi (vect_fully_masked): Document.
* params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
default value to 0.
* tree-vect-loop.c (vect_analyze_loop_costing): New function,
split out from...
(vect_analyze_loop_2): ...here. Don't check the vectorization
factor against the number of loop iterations if the loop is
fully-masked.
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_vect_fully_masked):
New proc.
* gcc.dg/vect/slp-3.c: Expect all loops to be vectorized if
vect_fully_masked.
* gcc.target/aarch64/sve/loop_add_4.c: New test.
* gcc.target/aarch64/sve/loop_add_4_run.c: Likewise.
* gcc.target/aarch64/sve/loop_add_5.c: Likewise.
* gcc.target/aarch64/sve/loop_add_5_run.c: Likewise.
* gcc.target/aarch64/sve/miniloop_1.c: Likewise.
* gcc.target/aarch64/sve/miniloop_2.c: Likewise.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r256629
Diffstat (limited to 'gcc/params.def')
-rw-r--r-- | gcc/params.def | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/params.def b/gcc/params.def index a0cd06d..a0aa576 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -139,7 +139,7 @@ DEFPARAM (PARAM_MAX_VARIABLE_EXPANSIONS, DEFPARAM (PARAM_MIN_VECT_LOOP_BOUND, "min-vect-loop-bound", "If -ftree-vectorize is used, the minimal loop bound of a loop to be considered for vectorization.", - 1, 1, 0) + 0, 0, 0) /* The maximum number of instructions to consider when looking for an instruction to fill a delay slot. If more than this arbitrary |