]> gcc.gnu.org Git - gcc.git/commitdiff
cse.c (insert_regs): Also in REG case...
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Mon, 14 Aug 2000 17:54:23 +0000 (17:54 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Mon, 14 Aug 2000 17:54:23 +0000 (18:54 +0100)
* cse.c (insert_regs): Also in REG case: When finding an invalid
value, and we make a new quantity, make sure that it won't be
mistaken by for a valid one by mention_regs.

From-SVN: r35679

gcc/ChangeLog
gcc/cse.c

index 524ee83e947100b256588a293cb8642c8b08121d..c0cab5b93a6b38cf2bdc711a4086f1e41d20bef9 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug 14 18:51:44 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * cse.c (insert_regs): Also in REG case: When finding an invalid
+       value, and we make a new quantity, make sure that it won't be
+       mistaken by for a valid one by mention_regs.
+
 2000-08-13  Ralf Gütlein <ralf.guetlein@aranea.de>
 
        * h8300.md: Remove obsolete peepholes.
index a65cecabdfa1516d0eac95ac799d517f67b71a95..cd220b78202c38f407582d7cdb29ce1082daf6f3 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -1244,6 +1244,19 @@ insert_regs (x, classp, modified)
                  return 1;
                }
 
+         /* Mention_regs for a SUBREG checks if REG_TICK is exactly one larger
+            than REG_IN_TABLE to find out if there was only a single preceding
+            invalidation - for the SUBREG - or another one, which would be
+            for the full register.  However, if we find here that REG_TICK
+            indicates that the register is invalid, it means that it has
+            been invalidated in a separate operation.  The SUBREG might be used
+            now (then this is a recursive call), or we might use the full REG
+            now and a SUBREG of it later.  So bump up REG_TICK so that
+            mention_regs will do the right thing.  */
+         if (! modified
+             && REG_IN_TABLE (regno) >= 0
+             && REG_TICK (regno) == REG_IN_TABLE (regno) + 1)
+           REG_TICK (regno)++;
          make_new_qty (regno, GET_MODE (x));
          return 1;
        }
@@ -1263,15 +1276,6 @@ insert_regs (x, classp, modified)
       unsigned int regno = REGNO (SUBREG_REG (x));
 
       insert_regs (SUBREG_REG (x), NULL_PTR, 0);
-      /* Mention_regs checks if REG_TICK is exactly one larger than
-        REG_IN_TABLE to find out if there was only a single preceding
-        invalidation - for the SUBREG - or another one, which would be
-        for the full register.  Since we don't invalidate the SUBREG
-        here first, we might have to bump up REG_TICK so that mention_regs
-        will do the right thing.  */
-      if (REG_IN_TABLE (regno) >= 0
-         && REG_TICK (regno) == REG_IN_TABLE (regno) + 1)
-       REG_TICK (regno)++;
       mention_regs (x);
       return 1;
     }
This page took 0.086365 seconds and 5 git commands to generate.