https://gcc.gnu.org/g:57d30924e2b3887a1aedc6102daa67bc3272ace7

commit r16-1910-g57d30924e2b3887a1aedc6102daa67bc3272ace7
Author: Richard Biener <rguent...@suse.de>
Date:   Wed Jul 2 13:44:59 2025 +0200

    Do not query further vector epilogues after a masked epilogue
    
    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.

Diff:
---
 gcc/tree-vect-loop.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 575987e4bf01..2782d61a5fc2 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -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))
        {

Reply via email to