From: Richard Biener Date: Thu, 31 Oct 2024 11:58:02 +0000 (+0100) Subject: Move vect_update_inits_of_drs X-Git-Tag: basepoints/gcc-16~4671 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e6d9e9f4a0db49376b1435bb6b9c5ac1badf13d;p=thirdparty%2Fgcc.git Move vect_update_inits_of_drs Move vect_update_inits_of_drs to after setting up the epilog metadata. * tree-vect-loop.cc (update_epilogue_loop_vinfo): Update DR inits after adjusting the epilog metadata. --- diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index dd18ec9ff175..e6d241482ce3 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -12166,11 +12166,6 @@ update_epilogue_loop_vinfo (class loop *epilogue, tree advance) LOOP_VINFO_BBS (epilogue_vinfo) = epilogue_bbs; LOOP_VINFO_NBBS (epilogue_vinfo) = epilogue->num_nodes; - /* Advance data_reference's with the number of iterations of the previous - loop and its prologue. */ - vect_update_inits_of_drs (epilogue_vinfo, advance, PLUS_EXPR); - - /* The EPILOGUE loop is a copy of the original loop so they share the same gimple UIDs. In this loop we update the loop_vec_info of the EPILOGUE to point to the copied statements. We also create a mapping of all LHS' in @@ -12293,6 +12288,10 @@ update_epilogue_loop_vinfo (class loop *epilogue, tree advance) DR_STMT (dr) = STMT_VINFO_STMT (stmt_vinfo); } + /* Advance data_reference's with the number of iterations of the previous + loop and its prologue. */ + vect_update_inits_of_drs (epilogue_vinfo, advance, PLUS_EXPR); + epilogue_vinfo->shared->datarefs_copy.release (); epilogue_vinfo->shared->save_datarefs (); }