reload1.c (do_output_reload): Check reg_reloaded_valid before looking at reg_reloaded...
authorGeoff Keating <geoffk@cygnus.com>
Sun, 27 Feb 2000 00:23:28 +0000 (00:23 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Sun, 27 Feb 2000 00:23:28 +0000 (00:23 +0000)
* reload1.c (do_output_reload): Check reg_reloaded_valid before
looking at reg_reloaded_contents.

From-SVN: r32201

gcc/ChangeLog
gcc/reload1.c

index b9d0d98..ff29304 100644 (file)
@@ -1,3 +1,8 @@
+2000-02-26  Geoff Keating  <geoffk@cygnus.com>
+
+       * reload1.c (do_output_reload): Check reg_reloaded_valid before
+       looking at reg_reloaded_contents.
+
 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
 
        * Makefile.in (STMP_FIXINC): New toggle.
index 3988899..c4fe640 100644 (file)
@@ -6648,7 +6648,8 @@ do_output_reload (chain, rl, j)
       /* We don't need to test full validity of last_regno for
         inherit here; we only want to know if the store actually
         matches the pseudo.  */
-      if (reg_reloaded_contents[last_regno] == pseudo_no
+      if (TEST_HARD_REG_BIT (reg_reloaded_valid, last_regno)
+         && reg_reloaded_contents[last_regno] == pseudo_no
          && spill_reg_store[last_regno]
          && rtx_equal_p (pseudo, spill_reg_stored_to[last_regno]))
        delete_output_reload (insn, j, last_regno);