reload1.c (emit_reload_insns): If pseudo that can't be replaced with its equivalent...
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Fri, 5 Mar 1999 13:43:54 +0000 (13:43 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Fri, 5 Mar 1999 13:43:54 +0000 (13:43 +0000)
* reload1.c (emit_reload_insns): If pseudo that can't be replaced
with its equivalent constant, fall back to reload_in.

From-SVN: r25604

gcc/ChangeLog
gcc/reload1.c

index 7058aba9f41130019fcb26c025106c73ba1ca445..968ea5ec57aab3cb0b412a500191f51ea5d2956f 100644 (file)
@@ -1,3 +1,8 @@
+Fri Mar  5 21:41:07 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * reload1.c (emit_reload_insns): If pseudo that can't be replaced
+       with its equivalent constant, fall back to reload_in.
+
 Fri Mar  5 13:20:39 1999  Richard Henderson  <rth@cygnus.com>
 
        * Makefile.in: Delete .flow2 debugging files.
index a9bed7a9b0265682f9d6e8fc07dc269ffec77921..97bc9988fa30b39febcbca2e8b2a45b7d83714ac 100644 (file)
@@ -6815,13 +6815,16 @@ emit_reload_insns (chain)
                     See comments in get_secondary_reload in reload.c.  */
                  /* If it is a pseudo that cannot be replaced with its
                     equivalent MEM, we must fall back to reload_in, which
-                    will have all the necessary substitutions registered.  */
+                    will have all the necessary substitutions registered.
+                    Likewise for a pseudo that can't be replaced with its
+                    equivalent constant.  */
                                
                  if (GET_CODE (oldequiv) == REG
                      && REGNO (oldequiv) >= FIRST_PSEUDO_REGISTER
-                     && reg_equiv_memory_loc[REGNO (oldequiv)] != 0)
+                     && (reg_equiv_memory_loc[REGNO (oldequiv)] != 0
+                         || reg_equiv_constant[REGNO (oldequiv)] != 0))
                    {
-                     if (reg_equiv_address[REGNO (oldequiv)]
+                     if (! reg_equiv_mem[REGNO (oldequiv)]
                          || num_not_at_initial_offset)
                        real_oldequiv = reload_in[j];
                      else
@@ -6830,9 +6833,10 @@ emit_reload_insns (chain)
 
                  if (GET_CODE (old) == REG
                      && REGNO (old) >= FIRST_PSEUDO_REGISTER
-                     && reg_equiv_memory_loc[REGNO (old)] != 0)
+                     && (reg_equiv_memory_loc[REGNO (old)] != 0
+                         || reg_equiv_constant[REGNO (old)] != 0))
                    {
-                     if (reg_equiv_address[REGNO (old)]
+                     if (! reg_equiv_mem[REGNO (old)]
                          || num_not_at_initial_offset)
                        real_old = reload_in[j];
                      else
@@ -6938,13 +6942,16 @@ emit_reload_insns (chain)
 
                  if ((GET_CODE (oldequiv) == REG
                       && REGNO (oldequiv) >= FIRST_PSEUDO_REGISTER
-                      && reg_equiv_memory_loc[REGNO (oldequiv)] != 0)
+                      && (reg_equiv_memory_loc[REGNO (oldequiv)] != 0
+                          || reg_equiv_constant[REGNO (oldequiv)] != 0))
                      || (GET_CODE (oldequiv) == SUBREG
                          && GET_CODE (SUBREG_REG (oldequiv)) == REG
                          && (REGNO (SUBREG_REG (oldequiv))
                              >= FIRST_PSEUDO_REGISTER)
-                         && (reg_equiv_memory_loc
-                             [REGNO (SUBREG_REG (oldequiv))] != 0)))
+                         && ((reg_equiv_memory_loc
+                              [REGNO (SUBREG_REG (oldequiv))] != 0)
+                             || (reg_equiv_constant
+                                 [REGNO (SUBREG_REG (oldequiv))] != 0))))
                    real_oldequiv = reload_in[j];
                  gen_reload (reloadreg, real_oldequiv, reload_opnum[j],
                              reload_when_needed[j]);