diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1997-04-03 12:34:07 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1997-04-03 12:34:07 -0800 |
commit | 24e46fc4024935f88a26e801b64a1ddf21eff40c (patch) | |
tree | 964bf0bf3fea0fc22e72d2a86029e068dc8d5d71 /gcc | |
parent | 7b05e2866148aaa297270c0fe4bcb823c8daf17b (diff) | |
download | gcc-24e46fc4024935f88a26e801b64a1ddf21eff40c.zip gcc-24e46fc4024935f88a26e801b64a1ddf21eff40c.tar.gz gcc-24e46fc4024935f88a26e801b64a1ddf21eff40c.tar.bz2 |
(move_deaths): Handle partial REG_DEAD note for
multi-reg hard register.
From-SVN: r13836
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/combine.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 94fbbab..a2d63ea 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); } |