aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2003-04-08 20:16:54 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2003-04-08 20:16:54 +0000
commit5a82c0b12b9acec428885b2ce534165b81b748c0 (patch)
tree86f219c53777bb206099b1ca39b7026fb2c5cbe4 /gcc
parent8a5275eb09e8d3914cb8497e3815231e60526c13 (diff)
downloadgcc-5a82c0b12b9acec428885b2ce534165b81b748c0.zip
gcc-5a82c0b12b9acec428885b2ce534165b81b748c0.tar.gz
gcc-5a82c0b12b9acec428885b2ce534165b81b748c0.tar.bz2
reorg.c (fill_slots_from_thread): When considering changing the insn following a reg-to-reg copy insn to use the...
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/reorg.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7533314..b0f45f6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/reorg.c b/gcc/reorg.c
index e3859a6..161e7b0 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -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);