This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix sharing issue in unroller


Hi,
this patch fix last remaining failure on ia64 showing on x86-64 too.
The problem is that unroller is calling into expanders, the expanders
generally are allowed to produce sharing, so we need to unshare the
newly constrcted code.  This is same as we do in ifcvt.c and I guess we
will need couple extra places over time.
In this case the sharing is introduced by expand_divmod that produce
subreg of register and pass it into targe expander that uses it in two
different instructions.

Bootstrapped/regtested i686-linux, x86_64-linux and ia64-linux, OK?

Honza

	* loop-unroll.c (unroll_loop_runtime_iterations): Unshare newly emit
	code.
Index: loop-unroll.c
===================================================================
--- loop-unroll.c	(revision 126112)
+++ loop-unroll.c	(working copy)
@@ -1025,6 +1025,7 @@ unroll_loop_runtime_iterations (struct l
 
   init_code = get_insns ();
   end_sequence ();
+  unshare_all_rtl_in_chain (init_code);
 
   /* Precondition the loop.  */
   split_edge_and_insert (loop_preheader_edge (loop), init_code);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]