https://gcc.gnu.org/g:a9139a67d16a0a909a6352feba670d9f6eda4517

commit r16-5313-ga9139a67d16a0a909a6352feba670d9f6eda4517
Author: Richard Biener <[email protected]>
Date:   Fri Nov 14 13:54:20 2025 +0100

    Remove LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P
    
    This is a write-only parameter, it cannot be relied upon either.
    So remove it.
    
            * tree-vectorizer.h (_loop_vec_info::epil_using_partial_vectors_p):
            Remove.
            (LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P): Likewise.
            * tree-vect-loop.cc (_loop_vec_info::_loop_vec_info):
            Do not initialize epil_using_partial_vectors_p.
            (vect_determine_partial_vectors_and_peeling): Do not set it.

Diff:
---
 gcc/tree-vect-loop.cc | 17 +----------------
 gcc/tree-vectorizer.h |  6 ------
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 576a69c82d25..e5a3971f1501 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -745,7 +745,6 @@ _loop_vec_info::_loop_vec_info (class loop *loop_in, 
vec_info_shared *shared)
     using_partial_vectors_p (false),
     using_decrementing_iv_p (false),
     using_select_vl_p (false),
-    epil_using_partial_vectors_p (false),
     allow_mutual_alignment (false),
     partial_load_store_bias (0),
     peeling_for_gaps (false),
@@ -1995,7 +1994,6 @@ vect_get_datarefs_in_loop (loop_p loop, basic_block *bbs,
        In this case:
 
         LOOP_VINFO_USING_PARTIAL_VECTORS_P == true
-        LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P == false
         LOOP_VINFO_PEELING_FOR_NITER == false
 
    (2) Make LOOP_VINFO operate on full vectors and use an epilogue loop
@@ -2004,18 +2002,6 @@ vect_get_datarefs_in_loop (loop_p loop, basic_block *bbs,
         LOOP_VINFO_USING_PARTIAL_VECTORS_P == false
         LOOP_VINFO_PEELING_FOR_NITER == true
 
-       There are two choices:
-
-       (2a) Consider vectorizing the epilogue loop at the same VF as the
-           main loop, but using partial vectors instead of full vectors.
-           In this case:
-
-             LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P == true
-
-       (2b) Consider vectorizing the epilogue loop at lower VFs only.
-           In this case:
-
-             LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P == false
  */
 
 opt_result
@@ -2027,7 +2013,6 @@ vect_determine_partial_vectors_and_peeling (loop_vec_info 
loop_vinfo)
 
   /* Decide whether to vectorize the loop with partial vectors.  */
   LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo) = false;
-  LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P (loop_vinfo) = false;
   if (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo)
       && LOOP_VINFO_MUST_USE_PARTIAL_VECTORS_P (loop_vinfo))
     LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo) = true;
@@ -2050,7 +2035,7 @@ vect_determine_partial_vectors_and_peeling (loop_vec_info 
loop_vinfo)
           || loop_vinfo->suggested_unroll_factor > 1)
          && !LOOP_VINFO_EPILOGUE_P (loop_vinfo)
          && !vect_known_niters_smaller_than_vf (loop_vinfo))
-       LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P (loop_vinfo) = true;
+       ;
       else
        LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo) = true;
     }
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 1635829c7662..c07fcb42d508 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -1135,10 +1135,6 @@ public:
      for single-rgroup control.  */
   bool using_select_vl_p;
 
-  /* True if we've decided to use partially-populated vectors for the
-     epilogue of loop.  */
-  bool epil_using_partial_vectors_p;
-
   /* True if we've decided to use peeling with versioning together, which 
allows
      unaligned unsupported data refs to be uniformly aligned after a certain
      amount of peeling (mutual alignment).  Otherwise, we use versioning alone
@@ -1272,8 +1268,6 @@ public:
 #define LOOP_VINFO_USING_PARTIAL_VECTORS_P(L) (L)->using_partial_vectors_p
 #define LOOP_VINFO_USING_DECREMENTING_IV_P(L) (L)->using_decrementing_iv_p
 #define LOOP_VINFO_USING_SELECT_VL_P(L) (L)->using_select_vl_p
-#define LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P(L)                             
\
-  (L)->epil_using_partial_vectors_p
 #define LOOP_VINFO_ALLOW_MUTUAL_ALIGNMENT(L) (L)->allow_mutual_alignment
 #define LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS(L) (L)->partial_load_store_bias
 #define LOOP_VINFO_VECT_FACTOR(L)          (L)->vectorization_factor

Reply via email to