aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-08-14 16:01:37 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-08-14 16:01:37 -0700
commitab28041e5ae3798cefdefb5c9200b9daa5be4ffb (patch)
tree20c55759e545079c0879198767fea4df61535fe9 /gcc/flow.c
parent17cbf35871d9fa4da552cbc40fb8da44d78cc5a2 (diff)
downloadgcc-ab28041e5ae3798cefdefb5c9200b9daa5be4ffb.zip
gcc-ab28041e5ae3798cefdefb5c9200b9daa5be4ffb.tar.gz
gcc-ab28041e5ae3798cefdefb5c9200b9daa5be4ffb.tar.bz2
(mark_used_regs): When adding REG_DEAD notes...
(mark_used_regs): When adding REG_DEAD notes, check for the case where a multiple register hard reg overlaps a register set by the insn. From-SVN: r7921
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index cc77429..21d28c1 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -2403,6 +2403,16 @@ mark_used_regs (needed, live, x, final, insn)
#endif
)
{
+ /* Check for the case where the register dying partially
+ overlaps the register set by this insn. */
+ if (regno < FIRST_PSEUDO_REGISTER
+ && HARD_REGNO_NREGS (regno, GET_MODE (x)) > 1)
+ {
+ int n = HARD_REGNO_NREGS (regno, GET_CODE (x));
+ while (--n >= 0)
+ some_needed |= dead_or_set_regno_p (insn, regno + n);
+ }
+
/* If none of the words in X is needed, make a REG_DEAD
note. Otherwise, we must make partial REG_DEAD notes. */
if (! some_needed)