From 37747c821026a1caffb58875a75368d1c56a5e89 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 6 Oct 1993 06:58:50 -0400 Subject: (record_reg_classes): Check if operands are the same by seeing if they are the same register. From-SVN: r5632 --- gcc/regclass.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/regclass.c b/gcc/regclass.c index 20b0b8a..9ccabf2 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 -- cgit v1.1