aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-09-08 11:21:19 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-09-18 15:40:10 +0200
commitde1389e24e8dc98b65bc8d40976172214ac4ecc0 (patch)
treea2f0028cbcc0486bfedee0b54db2e333f8879d43 /gcc/tree-vect-loop.cc
parentad5bfc2b7044ba962396de0dabcad1cd54234689 (diff)
downloadgcc-de1389e24e8dc98b65bc8d40976172214ac4ecc0.zip
gcc-de1389e24e8dc98b65bc8d40976172214ac4ecc0.tar.gz
gcc-de1389e24e8dc98b65bc8d40976172214ac4ecc0.tar.bz2
Fail vectorization when not using SLP and --param vect-force-slp == 1
The following adds --param vect-force-slp to enable the transition to full SLP. Full SLP is enforced during stmt analysis where it detects failed SLP discovery and at loop analysis time where it avoids analyzing a loop with SLP disabled. Failure to SLP results in vectorization to fail. * params.opt (vect-force-slp): New param, default 0. * doc/invoke.texi (--param vect-force-slp): Document. * tree-vect-loop.cc (vect_analyze_loop_2): When analyzing without SLP but --param vect-force-slp is 1 fail. * tree-vect-stmts.cc (vect_analyze_stmt): Fail vectorization for non-SLP stmts when --param vect-force-slp is 1.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
-rw-r--r--gcc/tree-vect-loop.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 62c7f90..d42694d 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -2891,6 +2891,12 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal,
/* This is the point where we can re-start analysis with SLP forced off. */
start_over:
+ /* When we arrive here with SLP disabled and we are supposed
+ to use SLP for everything fail vectorization. */
+ if (!slp && param_vect_force_slp)
+ return opt_result::failure_at (vect_location,
+ "may need non-SLP handling\n");
+
/* Apply the suggested unrolling factor, this was determined by the backend
during finish_cost the first time we ran the analyzis for this
vector mode. */