]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Move vect_update_inits_of_drs
authorRichard Biener <rguenther@suse.de>
Thu, 31 Oct 2024 11:58:02 +0000 (12:58 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 4 Nov 2024 11:24:42 +0000 (12:24 +0100)
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.

gcc/tree-vect-loop.cc

index dd18ec9ff1757f836d2a8c46be0dba9aecee474f..e6d241482ce30f4e0620b948218d090bf90656e9 100644 (file)
@@ -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 ();
 }