aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-09-19 12:48:55 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-09-19 12:48:55 -0400
commite64c4f9e2e81206c40dab6de2054cfb265db1ac2 (patch)
treee4d4f4a8b552b87020cbc174b5c2d8d496129852
parent2661cdd98dd00d1b820b00db6d6394e57b59ab24 (diff)
downloadgcc-e64c4f9e2e81206c40dab6de2054cfb265db1ac2.zip
gcc-e64c4f9e2e81206c40dab6de2054cfb265db1ac2.tar.gz
gcc-e64c4f9e2e81206c40dab6de2054cfb265db1ac2.tar.bz2
(find_reloads): Reject an alternative if two operands match the same
output and we have to do a reload. From-SVN: r5363
-rw-r--r--gcc/reload.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index a0199e8..27d017d 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -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':