]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not query further vector epilogues after a masked epilogue
authorRichard Biener <rguenther@suse.de>
Wed, 2 Jul 2025 11:44:59 +0000 (13:44 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 2 Jul 2025 12:56:40 +0000 (14:56 +0200)
When doing --param vect-partial-vector-usage=1 we'd continue querying
the target whether it wants more vector epilogues, but when it comes
back with a suggestion we then might iterate endlessly.  Do not
even ask the target when we decided for the last epilogue to be
one with partial vectors.

PR tree-optimization/120927
* tree-vect-loop.cc (vect_analyze_loop): Stop querying
further epilogues after one with partial vectors.

gcc/tree-vect-loop.cc

index 575987e4bf0142b3d9b118afea0481fd193cf6fd..2782d61a5fc25e0ea1eba2ae73799cfdb432a7f3 100644 (file)
@@ -3792,6 +3792,7 @@ vect_analyze_loop (class loop *loop, gimple *loop_vectorized_call,
       /* When we selected a first vectorized epilogue, see if the target
         suggests to have another one.  */
       if (!unlimited_cost_model (loop)
+         && !LOOP_VINFO_USING_PARTIAL_VECTORS_P (orig_loop_vinfo)
          && (orig_loop_vinfo->vector_costs->suggested_epilogue_mode ()
              != VOIDmode))
        {