re PR rtl-optimization/17625 (ICE on legal (doloop creates shared RTL))
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Fri, 24 Sep 2004 14:36:28 +0000 (16:36 +0200)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Fri, 24 Sep 2004 14:36:28 +0000 (14:36 +0000)
PR rtl-optimization/17625
* loop-doloop.c (doloop_modify): Unshare rtl before emitting it.

From-SVN: r88038

gcc/ChangeLog
gcc/loop-doloop.c

index aac77b4166fb7276eaf17ec28be9f9a90ff5912e..c01942dbb70fb636ee6c41ba5e65d5244be42531 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-24  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
+
+       PR rtl-optimization/17625
+       * loop-doloop.c (doloop_modify): Unshare rtl before emitting it.
+
 2004-09-24  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR tree-opt/17624
index e463eeab89963488dcade1c7276ef66150f5b9f9..7b4f4d42b5f8adbeaa79794db23bc2bbc0525e80 100644 (file)
@@ -292,7 +292,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc,
   if (GET_CODE (counter_reg) == PLUS)
     counter_reg = XEXP (counter_reg, 0);
 
-  count = desc->niter_expr;
+  count = copy_rtx (desc->niter_expr);
   increment_count = false;
   switch (GET_CODE (condition))
     {
@@ -345,7 +345,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc,
 
   if (desc->noloop_assumptions)
     {
-      rtx ass = desc->noloop_assumptions;
+      rtx ass = copy_rtx (desc->noloop_assumptions);
       basic_block preheader = loop_preheader_edge (loop)->src;
       basic_block set_zero
              = loop_split_edge_with (loop_preheader_edge (loop), NULL_RTX);