aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-08-21 13:15:57 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-08-21 13:15:57 -0400
commitc182df0b41f965988f06df25bcf63a98c0ec5030 (patch)
tree99ee77bf6df62aa8c80a6bad997fb32c86bdf0da /gcc
parent36f66f304842a54227f3a02d45b539fa9abd59c8 (diff)
downloadgcc-c182df0b41f965988f06df25bcf63a98c0ec5030.zip
gcc-c182df0b41f965988f06df25bcf63a98c0ec5030.tar.gz
gcc-c182df0b41f965988f06df25bcf63a98c0ec5030.tar.bz2
(wipe_dead_reg): Make a register mentioned in a REG_INC note die after
the instruction. From-SVN: r10264
Diffstat (limited to 'gcc')
-rw-r--r--gcc/local-alloc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index 3ab26ae..647b2d5 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -1,5 +1,5 @@
/* Allocate registers within a basic block, for GNU compiler.
- Copyright (C) 1987, 1988, 1991, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 91, 93, 94, 1995 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -2035,6 +2035,12 @@ wipe_dead_reg (reg, output_p)
}
}
+ /* If this register is used in an auto-increment address, then extend its
+ life to after this insn, so that it won't get allocated together with
+ the result of this insn. */
+ if (! output_p && find_regno_note (this_insn, REG_INC, regno))
+ output_p = 1;
+
if (regno < FIRST_PSEUDO_REGISTER)
{
mark_life (regno, GET_MODE (reg), 0);