(insert_regs): If a REG already is in a class but not in the mode we
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 31 Mar 1993 12:00:31 +0000 (07:00 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 31 Mar 1993 12:00:31 +0000 (07:00 -0500)
want, don't do anything to the classes.

From-SVN: r3951

gcc/cse.c

index 4404247..a2aac94 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -984,9 +984,14 @@ insert_regs (x, classp, modified)
     {
       register int regno = REGNO (x);
 
-      if (modified
-         || ! (REGNO_QTY_VALID_P (regno)
-               && qty_mode[reg_qty[regno]] == GET_MODE (x)))
+      /* If REGNO is in the equivalence table already but is of the
+        wrong mode for that equivalence, don't do anything here.  */
+
+      if (REGNO_QTY_VALID_P (regno)
+         && qty_mode[reg_qty[regno]] != GET_MODE (x))
+       return 0;
+
+      if (modified || ! REGNO_QTY_VALID_P (regno))
        {
          if (classp)
            for (classp = classp->first_same_value;