https://gcc.gnu.org/g:1bf102afed70d88d757d6f7b3014523e66ab42ff

commit r16-3295-g1bf102afed70d88d757d6f7b3014523e66ab42ff
Author: Richard Biener <rguent...@suse.de>
Date:   Wed Jul 30 15:38:03 2025 +0200

    Enable gather/scatter for epilogues of vector epilogues
    
    The restriction no longer applies, so remove it.
    
            * tree-vect-data-refs.cc (vect_check_gather_scatter):
            Remove restriction on epilogue of epilogue vectorization.

Diff:
---
 gcc/tree-vect-data-refs.cc | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
index 4cfd1a301c2b..f9bf6a216970 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -4597,13 +4597,6 @@ vect_check_gather_scatter (stmt_vec_info stmt_info, 
loop_vec_info loop_vinfo,
       masked_p = (ifn == IFN_MASK_LOAD || ifn == IFN_MASK_STORE);
     }
 
-  /* ???  For epilogues we adjust DR_REF to make the following stmt-based
-     analysis work, but this adjustment doesn't work for epilogues of
-     epilogues during transform, so disable gather/scatter in that case.  */
-  if (LOOP_VINFO_EPILOGUE_P (loop_vinfo)
-      && LOOP_VINFO_EPILOGUE_P (LOOP_VINFO_ORIG_LOOP_INFO (loop_vinfo)))
-    return false;
-
   /* True if we should aim to use internal functions rather than
      built-in functions.  */
   bool use_ifn_p = (DR_IS_READ (dr)

Reply via email to