diff mbox series

[1/2] Preserve ->move_dr behavior when adjusting epilogue info

Message ID 20241031141613.B55133857400@sourceware.org
State New
Headers show
Series [1/2] Preserve ->move_dr behavior when adjusting epilogue info | expand

Commit Message

Richard Biener Oct. 31, 2024, 2:15 p.m. UTC
When update_epilogue_loop_vinfo relates the shared loop DRs with
the epilogue stmts and infos it should not fiddle with how
pattern recognition applied move_dr.

Bootstrapped and tested on x86_64-unknown-linux-gnu.

	* tree-vect-loop.cc (update_epilogue_loop_vinfo): A DRs
	main stmt vinfo dr_aux should refer to a pattern stmt
	which is how move_dr sets this up.  We shouldn't undo this.
---
 gcc/tree-vect-loop.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index df89edac036..ac901e52743 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -12290,7 +12290,7 @@  update_epilogue_loop_vinfo (class loop *epilogue, tree advance)
 				     &find_in_mapping, &mapping);
 	}
       DR_STMT (dr) = STMT_VINFO_STMT (stmt_vinfo);
-      stmt_vinfo->dr_aux.stmt = stmt_vinfo;
+      stmt_vinfo->dr_aux.stmt = vstmt_vinfo;
     }
 
   epilogue_vinfo->shared->datarefs_copy.release ();