]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not bother with fake verifying of shared DRs
authorRichard Biener <rguenther@suse.de>
Thu, 31 Jul 2025 07:26:16 +0000 (09:26 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 31 Jul 2025 10:11:21 +0000 (12:11 +0200)
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.

gcc/tree-vect-loop.cc

index 80b5a0a326bd6003ebccffef1d9ce61ea5673276..9b4d200bb296957553c8528dfa01e47ea367a162 100644 (file)
@@ -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