]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
reload1.c (forget_old_reloads_1): Do not use subreg offset.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 16 May 2002 00:06:39 +0000 (00:06 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Thu, 16 May 2002 00:06:39 +0000 (00:06 +0000)
2002-05-15  Aldy Hernandez  <aldyh@redhat.com>

        * reload1.c (forget_old_reloads_1): Do not use subreg offset.

From-SVN: r53496

gcc/ChangeLog
gcc/reload1.c

index 0d3f409e33d9362634723f1d2b582bbc5ad77057..0613e309b404f48d6c26ead792345254eedfbc9a 100644 (file)
@@ -1,3 +1,7 @@
+2002-05-15  Aldy Hernandez  <aldyh@redhat.com>
+
+        * reload1.c (forget_old_reloads_1): Do not use subreg offset.
+
 2002-05-15  Aldy Hernandez  <aldyh@redhat.com>
 
         * config/rs6000/rs6000.md ("altivec_mtvscr"): Set VSCR register.
index 1bcd29b3ee446663aa0e332907c0449d865f096c..1349c3c85598eb5b6178c6f9ca96c1925276132a 100644 (file)
@@ -4098,23 +4098,21 @@ forget_old_reloads_1 (x, ignored, data)
 {
   unsigned int regno;
   unsigned int nr;
-  int offset = 0;
 
   /* note_stores does give us subregs of hard regs,
      subreg_regno_offset will abort if it is not a hard reg.  */
   while (GET_CODE (x) == SUBREG)
     {
-      offset += subreg_regno_offset (REGNO (SUBREG_REG (x)),
-                                    GET_MODE (SUBREG_REG (x)),
-                                    SUBREG_BYTE (x),
-                                    GET_MODE (x));
+      /* We ignore the subreg offset when calculating the regno,
+        because we are using the entire underlying hard register
+        below.  */
       x = SUBREG_REG (x);
     }
 
   if (GET_CODE (x) != REG)
     return;
 
-  regno = REGNO (x) + offset;
+  regno = REGNO (x);
 
   if (regno >= FIRST_PSEUDO_REGISTER)
     nr = 1;