aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-10-23 10:48:36 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-10-23 10:48:36 -0400
commitecd4080946e1ac6014123a65161c96c48e13ef21 (patch)
tree8a1039617bee5ff9e3fa9a985c63e4d59e3a22a7
parent02214a5c1475a8fd2ed983889eab632f31708704 (diff)
downloadgcc-ecd4080946e1ac6014123a65161c96c48e13ef21.zip
gcc-ecd4080946e1ac6014123a65161c96c48e13ef21.tar.gz
gcc-ecd4080946e1ac6014123a65161c96c48e13ef21.tar.bz2
(can_combine_p): When SMALL_REGISTER_CLASSES is defined, avoid
substituting a return register into I3. From-SVN: r13006
-rw-r--r--gcc/combine.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 5f07a35..745427a 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -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;