diff options
author | Richard Stallman <rms@gnu.org> | 1992-09-07 05:56:52 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-09-07 05:56:52 +0000 |
commit | 07d8ca2d9295b124556561d96571e6062d86d610 (patch) | |
tree | fc0c7d26e34e85d0b30a6e8b71f2f70f4db67c48 /gcc/regclass.c | |
parent | 21d12b804d4031c15fcc61b1558f74ce9413e123 (diff) | |
download | gcc-07d8ca2d9295b124556561d96571e6062d86d610.tar.gz |
(record_reg_class): For matching operands...
(record_reg_class): For matching operands, handle
case where the earlier one is not a pseudo like the case
where the later one is not a pseudo.
From-SVN: r2067
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r-- | gcc/regclass.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c index cb88cf835fb..343d30393ef 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -939,7 +939,24 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn) else alt_cost += copy_cost (op, mode, classes[j], 1); } + else if (GET_CODE (ops[j]) != REG + || REGNO (ops[j]) < FIRST_PSEUDO_REGISTER) + { + /* This op is a pseudo but the one it matches is not. */ + + /* If we can't put the other operand into a register, this + alternative can't be used. */ + + if (classes[j] == NO_REGS) + alt_fail = 1; + /* Otherwise, add to the cost of this alternative the cost + to copy the other operand to the register used for this + operand. */ + + else + alt_cost += copy_cost (ops[j], mode, classes[j], 1); + } else { /* The costs of this operand are the same as that of the |