https://gcc.gnu.org/g:60b1938de008cc26a13210f1e5e49e23e64def3c

commit r16-2662-g60b1938de008cc26a13210f1e5e49e23e64def3c
Author: Richard Biener <rguent...@suse.de>
Date:   Thu Jul 31 09:26:16 2025 +0200

    Do not bother with fake verifying of shared DRs
    
    The following avoids comparing the shared DRs against their unmodified
    copy for epilogues during loop transform since they are actually
    modified by update_epilogue_loop_vinfo.  Avoid the pointless faking
    of the original DRs there.
    
            * tree-vect-loop.cc (vect_transform_loop): Do not verify DRs
            have not been modified for epilogue loops.
            (update_epilogue_loop_vinfo): Do not copy modified DRs to
            the originals.

Diff:
---
 gcc/tree-vect-loop.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 80b5a0a326bd..9b4d200bb296 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -11318,9 +11318,6 @@ update_epilogue_loop_vinfo (class loop *epilogue, tree 
advance)
 
   /* Remember the advancement made.  */
   LOOP_VINFO_DRS_ADVANCED_BY (epilogue_vinfo) = advance;
-
-  epilogue_vinfo->shared->datarefs_copy.release ();
-  epilogue_vinfo->shared->save_datarefs ();
 }
 
 /*  When vectorizing early break statements instructions that happen before
@@ -11426,7 +11423,8 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple 
*loop_vectorized_call)
 
   DUMP_VECT_SCOPE ("vec_transform_loop");
 
-  loop_vinfo->shared->check_datarefs ();
+  if (! LOOP_VINFO_EPILOGUE_P (loop_vinfo))
+    loop_vinfo->shared->check_datarefs ();
 
   /* Use the more conservative vectorization threshold.  If the number
      of iterations is constant assume the cost check has been performed

Reply via email to