This patch fixes a couple of cases where reload incorrectly thinks it
should be messing around with the result of a match_operator operand.
Given that it's never even tried to validate the contents of such an
operand the changes it tries to make are bogus.

This is needed for an upcoming patch I have for improving the code
generated for ARM mul operations.

Tested (along with the forthcoming patch) on arm-eabi.

OK?

R.

<date>  Richard Earnshaw  <rearn...@arm.com>

        * reload.c (find_reloads): Don't try to reload operands that
        match match_operator.

diff --git a/gcc/reload.c b/gcc/reload.c
index c671765..618b1c0 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -3891,7 +3891,8 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
   /* Any constants that aren't allowed and can't be reloaded
      into registers are here changed into memory references.  */
   for (i = 0; i < noperands; i++)
-    if (! goal_alternative_win[i])
+    if (! goal_alternative_win[i]
+	&& ! recog_data.is_operator[i])
       {
 	rtx op = recog_data.operand[i];
 	rtx subreg = NULL_RTX;
@@ -3954,7 +3955,8 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
 
   /* Now record reloads for all the operands that need them.  */
   for (i = 0; i < noperands; i++)
-    if (! goal_alternative_win[i])
+    if (! goal_alternative_win[i]
+	&& ! recog_data.is_operator[i])
       {
 	/* Operands that match previous ones have already been handled.  */
 	if (goal_alternative_matches[i] >= 0)

Reply via email to