reorg.c (fill_slots_from_thread): When considering changing the insn following a...
authorHans-Peter Nilsson <hp@axis.com>
Tue, 8 Apr 2003 20:16:54 +0000 (20:16 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Tue, 8 Apr 2003 20:16:54 +0000 (20:16 +0000)
* reorg.c (fill_slots_from_thread): When considering changing the
insn following a reg-to-reg copy insn to use the source reg of the
copy, bail out if there's overlap between the registers.

From-SVN: r65381

gcc/ChangeLog
gcc/reorg.c

index 75333143b52ed727a9938e3f9cde434b085cbcea..b0f45f6dffeabf776305a8503672aa3209317339 100644 (file)
@@ -1,3 +1,9 @@
+2003-04-08  Hans-Peter Nilsson  <hp@axis.com>
+
+       * reorg.c (fill_slots_from_thread): When considering changing the
+       insn following a reg-to-reg copy insn to use the source reg of the
+       copy, bail out if there's overlap between the registers.
+
 2003-04-08  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
 
        * function.c (postponed_insns): New.
index e3859a6db4153d59b3ae8d429fbc9639aa784560..161e7b03ab23488f2d44a7f32ea5eb0c7f4563bd 100644 (file)
@@ -2813,11 +2813,13 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely,
         that would make the replacement into the insn invalid.  We also can't
         do this if it modifies our source, because it might be an earlyclobber
         operand.  This latter test also prevents updating the contents of
-        a PRE_INC.  */
+        a PRE_INC.  We also can't do this if there's overlap of source and
+        destination.  Overlap may happen for larger-than-register-size modes.  */
 
       if (GET_CODE (trial) == INSN && GET_CODE (pat) == SET
          && GET_CODE (SET_SRC (pat)) == REG
-         && GET_CODE (SET_DEST (pat)) == REG)
+         && GET_CODE (SET_DEST (pat)) == REG
+         && !reg_overlap_mentioned_p (SET_DEST (pat), SET_SRC (pat)))
        {
          rtx next = next_nonnote_insn (trial);