]> gcc.gnu.org Git - gcc.git/commitdiff
(attach_deaths): When adding REG_DEAD notes...
authorJim Wilson <wilson@gcc.gnu.org>
Sun, 14 Aug 1994 22:59:58 +0000 (15:59 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Sun, 14 Aug 1994 22:59:58 +0000 (15:59 -0700)
(attach_deaths): When adding REG_DEAD notes, check for
the case where a multiple register hard reg overlaps a register
set by the insn.

From-SVN: r7919

gcc/sched.c

index 9870967ea7109972bf4192f6469097b76ab0751e..549148b61b2948ec8da6e534d297cb668c2b8819 100644 (file)
@@ -2825,6 +2825,16 @@ attach_deaths (x, insn, set_p)
              {
                if (! all_needed && ! dead_or_set_p (insn, x))
                  {
+                   /* 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.  */
This page took 0.064306 seconds and 5 git commands to generate.