(can_combine_p): When SMALL_REGISTER_CLASSES is defined, avoid
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 23 Oct 1996 14:48:36 +0000 (10:48 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 23 Oct 1996 14:48:36 +0000 (10:48 -0400)
substituting a return register into I3.

From-SVN: r13006

gcc/combine.c

index 5f07a35e1be6d33a180eae0ab45ed6f8f7f3a0c6..745427a11a1d2501442748d860e358879e08ec85 100644 (file)
@@ -960,11 +960,16 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
              /* Don't extend the life of a hard register unless it is
                 user variable (if we have few registers) or it can't
                 fit into the desired register (meaning something special
-                is going on).  */
+                is going on).
+                Also avoid substituting a return register into I3, because
+                reload can't handle a conflict with constraints of other
+                inputs.  */
              || (REGNO (src) < FIRST_PSEUDO_REGISTER
                  && (! HARD_REGNO_MODE_OK (REGNO (src), GET_MODE (src))
 #ifdef SMALL_REGISTER_CLASSES
                      || (! all_adjacent && ! REG_USERVAR_P (src))
+                     || (FUNCTION_VALUE_REGNO_P (REGNO (src))
+                         && ! REG_USERVAR_P (src))
 #endif
                      ))))
        return 0;