aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-02-11 17:30:20 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-02-11 17:30:20 -0500
commitdc9036088b25b9df5d960f9b608b670181b7dccb (patch)
treec332a2c723c780b974fd32263ba1c942763da0ed
parent9d891e9a7e8ab20530e4cf9eb412c2a21a7a4295 (diff)
downloadgcc-dc9036088b25b9df5d960f9b608b670181b7dccb.zip
gcc-dc9036088b25b9df5d960f9b608b670181b7dccb.tar.gz
gcc-dc9036088b25b9df5d960f9b608b670181b7dccb.tar.bz2
(record_reg_classes): Fix logic in case of matching operands.
From-SVN: r6528
-rw-r--r--gcc/regclass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index e055c4f..3beac27 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -988,15 +988,15 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn)
if (GET_CODE (op) != REG || REGNO (op) < FIRST_PSEUDO_REGISTER)
{
/* If this matches the other operand, we have no added
- cost. */
+ cost and we win. */
if (rtx_equal_p (ops[j], op))
- ;
+ win = 1;
/* If we can put the other operand into a register, add to
the cost of this alternative the cost to copy this
operand to the register used for the other operand. */
- if (classes[j] != NO_REGS)
+ else if (classes[j] != NO_REGS)
alt_cost += copy_cost (op, mode, classes[j], 1), win = 1;
}
else if (GET_CODE (ops[j]) != REG