OSDN Git Service

(mark_used_regs): When adding REG_DEAD notes, check for
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 14 Aug 1994 23:01:37 +0000 (23:01 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 14 Aug 1994 23:01:37 +0000 (23:01 +0000)
the case where a multiple register hard reg overlaps a register
set by the insn.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7921 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/flow.c

index cc77429..21d28c1 100644 (file)
@@ -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)