aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-10-07 11:05:17 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-10-07 13:57:39 +0200
commit9b86efd5210101954bd187c3aa8bb909610a5746 (patch)
tree22bb0767cd1d4db3bef33b276451c25baeb69faf /gcc/tree-vectorizer.cc
parent7faadb1f261c6b8ef988c400c39ec7df09839dbe (diff)
downloadgcc-9b86efd5210101954bd187c3aa8bb909610a5746.zip
gcc-9b86efd5210101954bd187c3aa8bb909610a5746.tar.gz
gcc-9b86efd5210101954bd187c3aa8bb909610a5746.tar.bz2
tree-optimization/116982 - analyze scalar loop exit early
The following makes sure to discover the scalar loop IV exit during analysis as failure to do so (if DCE and friends are disabled this can happen due to if-conversion doing DCE and FRE on the if-converted loop) would ICE later. I refrained from larger refactoring to be able to eventually backport. PR tree-optimization/116982 * tree-vectorizer.h (vect_analyze_loop): Pass in .LOOP_VECTORIZED call. (vect_analyze_loop_form): Likewise. * tree-vect-loop.cc (vect_analyze_loop_form): Reject loops where we cannot determine a IV exit for the scalar loop. (vect_analyze_loop): Adjust. * tree-vectorizer.cc (try_vectorize_loop_1): Likewise. * tree-parloops.cc (gather_scalar_reductions): Likewise.
Diffstat (limited to 'gcc/tree-vectorizer.cc')
-rw-r--r--gcc/tree-vectorizer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc
index d4ab473..fed12c4 100644
--- a/gcc/tree-vectorizer.cc
+++ b/gcc/tree-vectorizer.cc
@@ -1067,7 +1067,8 @@ try_vectorize_loop_1 (hash_table<simduid_to_vf> *&simduid_to_vf_htab,
LOCATION_LINE (vect_location.get_location_t ()));
/* Try to analyze the loop, retaining an opt_problem if dump_enabled_p. */
- opt_loop_vec_info loop_vinfo = vect_analyze_loop (loop, &shared);
+ opt_loop_vec_info loop_vinfo = vect_analyze_loop (loop, loop_vectorized_call,
+ &shared);
loop->aux = loop_vinfo;
if (!loop_vinfo)