Commit 77e67eac by Richard Kenner

record_reg_classes): When an alternative requires a match...

record_reg_classes): When an alternative requires a match, but we do
it with a copy into a register, that alternative wins.

From-SVN: r3862
parent 6d44728a
...@@ -957,18 +957,12 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn) ...@@ -957,18 +957,12 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn)
if (rtx_equal_p (ops[j], op)) if (rtx_equal_p (ops[j], op))
; ;
/* If we can't put the other operand into a register, this /* If we can put the other operand into a register, add to
alternative can't be used. */ the cost of this alternative the cost to copy this
operand to the register used for the other operand. */
else if (classes[j] == NO_REGS)
alt_fail = 1;
/* Otherwise, add to the cost of this alternative the cost if (classes[j] != NO_REGS)
to copy this operand to the register used for the other alt_cost += copy_cost (op, mode, classes[j], 1), win = 1;
operand. */
else
alt_cost += copy_cost (op, mode, classes[j], 1);
} }
else if (GET_CODE (ops[j]) != REG else if (GET_CODE (ops[j]) != REG
|| REGNO (ops[j]) < FIRST_PSEUDO_REGISTER) || REGNO (ops[j]) < FIRST_PSEUDO_REGISTER)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment