alias.c (find_base_value): Recall base values for fixed hard regs.
authorRichard Henderson <rth@redhat.com>
Thu, 7 Feb 2002 08:57:04 +0000 (00:57 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 7 Feb 2002 08:57:04 +0000 (00:57 -0800)
* alias.c (find_base_value): Recall base values for fixed hard regs.
* loop.c (loop_regs_update): Don't use single_set on non-insns.

From-SVN: r49570

gcc/ChangeLog
gcc/alias.c
gcc/loop.c

index ca0e3951763919ae606a62ea938913c47bf2ed9f..29ef508326e6d24c3f4f4a0c60c29f74a44181ae 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-07  Richard Henderson  <rth@redhat.com>
+
+       * alias.c (find_base_value): Recall base values for fixed hard regs.
+       * loop.c (loop_regs_update): Don't use single_set on non-insns.
+
 2002-02-07  Alexandre Oliva  <aoliva@redhat.com>
 
        * config/mips/mips.md (define_delay) [mips16]: Adjust required
index a84d89439a7389a5818a1855888f672068137f30..95b16ca1ae7181a33935d60b696f513de70b56c9 100644 (file)
@@ -744,12 +744,12 @@ find_base_value (src)
        return new_reg_base_value[regno];
 
       /* If a pseudo has a known base value, return it.  Do not do this
-        for hard regs since it can result in a circular dependency
-        chain for registers which have values at function entry.
+        for non-fixed hard regs since it can result in a circular
+        dependency chain for registers which have values at function entry.
 
         The test above is not sufficient because the scheduler may move
         a copy out of an arg reg past the NOTE_INSN_FUNCTION_BEGIN.  */
-      if (regno >= FIRST_PSEUDO_REGISTER
+      if ((regno >= FIRST_PSEUDO_REGISTER || fixed_regs[regno])
          && regno < reg_base_value_size
          && reg_base_value[regno])
        return reg_base_value[regno];
index e0847a8c32f7e18df059682727ff594444f90265..5c92ec37cf2b8b66427fe883ee9886bafc214bfe 100644 (file)
@@ -7637,9 +7637,9 @@ loop_regs_update (loop, seq)
     }
   else
     {
-      rtx set = single_set (seq);
-      if (set && GET_CODE (SET_DEST (set)) == REG)
-       record_base_value (REGNO (SET_DEST (set)), SET_SRC (set), 0);
+      if (GET_CODE (seq) == SET
+         && GET_CODE (SET_DEST (seq)) == REG)
+       record_base_value (REGNO (SET_DEST (seq)), SET_SRC (seq), 0);
     }
 }