(find_reloads): Reject an alternative if two operands match the same
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 19 Sep 1993 16:48:55 +0000 (12:48 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 19 Sep 1993 16:48:55 +0000 (12:48 -0400)
output and we have to do a reload.

From-SVN: r5363

gcc/reload.c

index a0199e8..27d017d 100644 (file)
@@ -2730,6 +2730,17 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
                   we are supposed to match can be fixed with reloads.  */
                badop = 0;
                this_alternative[i] = this_alternative[c];
+
+               /* If we have to reload this operand and some previous
+                  operand also had to match the same thing as this
+                  operand, we don't know how to do that.  So reject this
+                  alternative.  */
+               if (! win || force_reload)
+                 for (j = 0; j < i; j++)
+                   if (this_alternative_matches[j]
+                       == this_alternative_matches[i])
+                     badop = 1;
+
                break;
 
              case 'p':