aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-04-29 13:53:20 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1998-04-29 14:53:20 +0100
commit93da030f633623de87801b2aea0b8cfe79edebc2 (patch)
tree1f31fde3493a2484bb977cf52131e3ece99e3543
parent0c84c6183433da16ca1062e0accb15b5f3abd664 (diff)
downloadgcc-93da030f633623de87801b2aea0b8cfe79edebc2.zip
gcc-93da030f633623de87801b2aea0b8cfe79edebc2.tar.gz
gcc-93da030f633623de87801b2aea0b8cfe79edebc2.tar.bz2
sched.c (new_insn_dead_notes): Check if the register was used in the original instruction.
* sched.c (new_insn_dead_notes): Check if the register was used in the original instruction. * haifa-sched.c (new_insn_dead_notes): Likewise. From-SVN: r19494
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/haifa-sched.c7
-rw-r--r--gcc/sched.c7
3 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 42f7119..b0c68c2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Wed Apr 29 21:45:16 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sched.c (new_insn_dead_notes): Check if the register was
+ used in the original instruction.
+ * haifa-sched.c (new_insn_dead_notes): Likewise.
+
Wed Apr 29 13:46:03 1998 Jim Wilson <wilson@cygnus.com>
* dwarf2out.c (scope_die_for): If could not find proper scope,
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 8d220f0..7fccfd2 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -7621,6 +7621,13 @@ new_insn_dead_notes (pat, insn, last, orig_insn)
if (GET_CODE (dest) == REG)
{
+ /* If the original insn already used this register, we may not add new
+ notes for it. One example for a split that needs this test is
+ when a multi-word memory access with register-indirect addressing
+ is split into multiple memory accesses with auto-increment and
+ one adjusting add instruction for the address register. */
+ if (reg_referenced_p (dest, PATTERN (orig_insn)))
+ return;
for (tem = last; tem != insn; tem = PREV_INSN (tem))
{
if (GET_RTX_CLASS (GET_CODE (tem)) == 'i'
diff --git a/gcc/sched.c b/gcc/sched.c
index a44002e..635dceb 100644
--- a/gcc/sched.c
+++ b/gcc/sched.c
@@ -3655,6 +3655,13 @@ new_insn_dead_notes (pat, insn, last, orig_insn)
if (GET_CODE (dest) == REG)
{
+ /* If the original insn already used this register, we may not add new
+ notes for it. One example for a split that needs this test is
+ when a multi-word memory access with register-indirect addressing
+ is split into multiple memory accesses with auto-increment and
+ one adjusting add instruction for the address register. */
+ if (reg_referenced_p (dest, PATTERN (orig_insn)))
+ return;
for (tem = last; tem != insn; tem = PREV_INSN (tem))
{
if (GET_RTX_CLASS (GET_CODE (tem)) == 'i'