cselib.c (cselib_process_insn): Clear out regs where HARD_REGNO_CALL_PART_CLOBBERED...
authorDale Johannesen <dalej@apple.com>
Fri, 11 Feb 2005 18:12:33 +0000 (18:12 +0000)
committerDale Johannesen <dalej@gcc.gnu.org>
Fri, 11 Feb 2005 18:12:33 +0000 (18:12 +0000)
2005-02-11  Dale Johannesen  <dalej@apple.com>

* cselib.c (cselib_process_insn):  Clear out regs where
HARD_REGNO_CALL_PART_CLOBBERED is true at a call.
* reload.c (find_equiv_reg): Ditto.

From-SVN: r94885

gcc/ChangeLog
gcc/cselib.c
gcc/reload.c

index 8740f2b3a4c47f028ab9fc487157cddf23f5f8be..33f2560a52b4182554b562d71d6de5442c6066c3 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-11  Dale Johannesen  <dalej@apple.com>
+
+       * cselib.c (cselib_process_insn):  Clear out regs where
+       HARD_REGNO_CALL_PART_CLOBBERED is true at a call.
+       * reload.c (find_equiv_reg): Ditto.
+
 2005-02-11  Ian Lance Taylor  <ian@airs.com>
 
        * read-rtl.c (read_rtx_1): Give fatal error if we see a vector
index c64e0874eeff0f18a766ec20bc7b08898347eafd..f453489e12bf9c9b8de4276e82a83719c0eaf123 100644 (file)
@@ -1380,7 +1380,10 @@ cselib_process_insn (rtx insn)
   if (CALL_P (insn))
     {
       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
-       if (call_used_regs[i])
+       if (call_used_regs[i]
+           || (REG_VALUES (i) && REG_VALUES (i)->elt
+               && HARD_REGNO_CALL_PART_CLOBBERED (i, 
+                     GET_MODE (REG_VALUES (i)->elt->u.val_rtx))))
          cselib_invalidate_regno (i, reg_raw_mode[i]);
 
       if (! CONST_OR_PURE_CALL_P (insn))
index 0b865a1925f2b86fa0c7bf3785448dea577633e7..3b3ca9f89f4a6c7a8a15d811d0fcc3203c497308 100644 (file)
@@ -6705,12 +6705,14 @@ find_equiv_reg (rtx goal, rtx insn, enum reg_class class, int other,
 
          if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER)
            for (i = 0; i < nregs; ++i)
-             if (call_used_regs[regno + i])
+             if (call_used_regs[regno + i]
+                 || HARD_REGNO_CALL_PART_CLOBBERED (regno + i, mode))
                return 0;
 
          if (valueno >= 0 && valueno < FIRST_PSEUDO_REGISTER)
            for (i = 0; i < valuenregs; ++i)
-             if (call_used_regs[valueno + i])
+             if (call_used_regs[valueno + i]
+                 || HARD_REGNO_CALL_PART_CLOBBERED (valueno + i, mode))
                return 0;
        }