loop-unroll.c (unroll_loop_runtime_iterations): Unshare newly emit code.
authorJan Hubicka <jh@suse.cz>
Sat, 30 Jun 2007 11:16:33 +0000 (13:16 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 30 Jun 2007 11:16:33 +0000 (11:16 +0000)
* loop-unroll.c (unroll_loop_runtime_iterations): Unshare newly emit
code.

From-SVN: r126141

gcc/ChangeLog
gcc/loop-unroll.c

index 047c18ff7c3bf6c5eee36f21c5722c2837a3eab1..ce5bdd0bf65908d8c056aa73a3c0b2752a61c004 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-30  Jan Hubicka  <jh@suse.cz>
+
+       * loop-unroll.c (unroll_loop_runtime_iterations): Unshare newly emit    
+       code.
+
 2006-06-30  Thomas Neumann  <tneumann@users.sourceforge.net>
 
        * ipa.c (cgraph_postorder): Cast according to the coding conventions.
index 77d454f35bc77f6b70b563961cbf399498cefdb7..3e20fcb4b0d4a274f09334666da0916368167bb8 100644 (file)
@@ -1025,6 +1025,7 @@ unroll_loop_runtime_iterations (struct loop *loop)
 
   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);