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.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
* 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 | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index ccfe6f33a72..355692ea7ad 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -11272,9 +11272,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
@@ -11380,7 +11377,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
--
2.43.0