summaryrefslogtreecommitdiffstats
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1997-04-03 20:34:07 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1997-04-03 20:34:07 +0000
commitdcbcfb63a9799c89290dfebb460832699291ed0e (patch)
tree964bf0bf3fea0fc22e72d2a86029e068dc8d5d71 /gcc/combine.c
parent7479e38d222421633eeac489bed03093c7d07fa9 (diff)
downloadppe42-gcc-dcbcfb63a9799c89290dfebb460832699291ed0e.tar.gz
ppe42-gcc-dcbcfb63a9799c89290dfebb460832699291ed0e.zip
(move_deaths): Handle partial REG_DEAD note for
multi-reg hard register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13836 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 94fbbab22aa..a2d63ea82fc 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10800,7 +10800,7 @@ move_deaths (x, maybe_kill_insn, from_cuid, to_insn, pnotes)
if (note != 0 && regno < FIRST_PSEUDO_REGISTER
&& (GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
- != GET_MODE_SIZE (GET_MODE (x))))
+ > GET_MODE_SIZE (GET_MODE (x))))
{
int deadregno = REGNO (XEXP (note, 0));
int deadend
@@ -10816,18 +10816,28 @@ move_deaths (x, maybe_kill_insn, from_cuid, to_insn, pnotes)
gen_rtx (REG, reg_raw_mode[i], i),
REG_NOTES (where_dead));
}
- /* If we didn't find any note, and we have a multi-reg hard
+ /* If we didn't find any note, or if we found a REG_DEAD note that
+ covers only part of the given reg, and we have a multi-reg hard
register, then to be safe we must check for REG_DEAD notes
for each register other than the first. They could have
their own REG_DEAD notes lying around. */
- else if (note == 0 && regno < FIRST_PSEUDO_REGISTER
+ else if ((note == 0
+ || (note != 0
+ && (GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
+ < GET_MODE_SIZE (GET_MODE (x)))))
+ && regno < FIRST_PSEUDO_REGISTER
&& HARD_REGNO_NREGS (regno, GET_MODE (x)) > 1)
{
int ourend = regno + HARD_REGNO_NREGS (regno, GET_MODE (x));
- int i;
+ int i, offset;
rtx oldnotes = 0;
- for (i = regno + 1; i < ourend; i++)
+ if (note)
+ offset = HARD_REGNO_NREGS (regno, GET_MODE (XEXP (note, 0)));
+ else
+ offset = 1;
+
+ for (i = regno + offset; i < ourend; i++)
move_deaths (gen_rtx (REG, reg_raw_mode[i], i),
maybe_kill_insn, from_cuid, to_insn, &oldnotes);
}
OpenPOWER on IntegriCloud