summaryrefslogtreecommitdiff
path: root/gcc/regclass.c
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-10-05 03:07:03 +0000
committerRichard Stallman <rms@gnu.org>1993-10-05 03:07:03 +0000
commita8683de70b540a7b40dedf4222677226a5c52b48 (patch)
treee9cff5b8637c03b0120850ed11fdf32734c47533 /gcc/regclass.c
parent69249c1b8e4513bc67b14f1e8fe70d50f85c3c75 (diff)
downloadgcc-a8683de70b540a7b40dedf4222677226a5c52b48.tar.gz
(record_reg_classes): There is no alt_cost
for a pair of matching args if they are the same pseudo reg. From-SVN: r5597
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index be78332546e..20b0b8a9824 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -998,8 +998,10 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn)
instruction. */
this_op_costs[i] = this_op_costs[j];
- if (! find_reg_note (insn, REG_DEAD, op))
- alt_cost += 2;
+ 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;
/* This is in place of ordinary cost computation
for this operand, so skip to the end of the