summaryrefslogtreecommitdiff
path: root/gcc/regclass.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-10-06 06:58:50 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-10-06 06:58:50 -0400
commit37747c821026a1caffb58875a75368d1c56a5e89 (patch)
treec47a1f368efe904b7a24d54a15b3a6f8dddecf3f /gcc/regclass.c
parent2bb81c86deadeb3c95eff414c9a44c73125b0ae5 (diff)
downloadgcc-37747c821026a1caffb58875a75368d1c56a5e89.tar.gz
(record_reg_classes): Check if operands are the same by seeing if they
are the same register. From-SVN: r5632
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 20b0b8a9824..9ccabf2730f 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -998,10 +998,9 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn)
instruction. */
this_op_costs[i] = this_op_costs[j];
- if (! (GET_CODE (op) == REG && rtx_equal_p (op, ops[j])))
- /* No cost if both are the same pseudo reg. */
- if (! find_reg_note (insn, REG_DEAD, op))
- alt_cost += 2;
+ if (REGNO (ops[i]) != REGNO (ops[j])
+ && ! find_reg_note (insn, REG_DEAD, op))
+ alt_cost += 2;
/* This is in place of ordinary cost computation
for this operand, so skip to the end of the