]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Enable ranger for the vectorizer
authorRichard Biener <rguenther@suse.de>
Fri, 7 Nov 2025 12:54:14 +0000 (13:54 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 11 Nov 2025 14:36:04 +0000 (15:36 +0100)
The following enables ranger for the vectorizer, this lets niter
analysis use the active ranger to simplify conditions.

PR tree-optimization/122587
* tree-vectorizer.cc (pass_vectorize::execute): Enable
ranger around analysis and code generation.

gcc/tree-vectorizer.cc

index 97b6297fb14514486d3bc65cd1c897ecb79d6d06..e7a3f26504837ca7e95b5187c8ac4ec226dd7f63 100644 (file)
@@ -83,6 +83,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "internal-fn.h"
 #include "tree-ssa-sccvn.h"
 #include "tree-into-ssa.h"
+#include "gimple-range.h"
 
 /* Loop or bb location, with hotness information.  */
 dump_user_location_t vect_location;
@@ -1279,6 +1280,7 @@ pass_vectorize::execute (function *fun)
     note_simd_array_uses (&simd_array_to_simduid_htab, fun);
 
   /*  ----------- Analyze loops. -----------  */
+  enable_ranger (fun);
 
   /* If some loop was duplicated, it gets bigger number
      than all previously defined loops.  This fact allows us to run
@@ -1341,6 +1343,7 @@ pass_vectorize::execute (function *fun)
                      num_vectorized_loops);
 
   /*  ----------- Finalize. -----------  */
+  disable_ranger (fun);
 
   if (any_ifcvt_loops)
     for (i = 1; i < number_of_loops (fun); i++)