Commit 4841ba4b by Richard Kenner

(record_reg_classes): When handling case of single SET between a hard register…

(record_reg_classes): When handling case of single SET between a hard register alone in a class and a pseudo...

(record_reg_classes): When handling case of single SET
between a hard register alone in a class and a pseudo, make sure the
register is the only member of the class.

From-SVN: r8511
parent 1ced4e9b
...@@ -1364,6 +1364,7 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn) ...@@ -1364,6 +1364,7 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn)
int regno = REGNO (ops[!i]); int regno = REGNO (ops[!i]);
enum machine_mode mode = GET_MODE (ops[!i]); enum machine_mode mode = GET_MODE (ops[!i]);
int class; int class;
int nr;
if (regno >= FIRST_PSEUDO_REGISTER && prefclass != 0 if (regno >= FIRST_PSEUDO_REGISTER && prefclass != 0
&& (reg_class_size[prefclass[regno]] && (reg_class_size[prefclass[regno]]
...@@ -1373,7 +1374,21 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn) ...@@ -1373,7 +1374,21 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn)
for (class = 0; class < N_REG_CLASSES; class++) for (class = 0; class < N_REG_CLASSES; class++)
if (TEST_HARD_REG_BIT (reg_class_contents[class], regno) if (TEST_HARD_REG_BIT (reg_class_contents[class], regno)
&& reg_class_size[class] == CLASS_MAX_NREGS (class, mode)) && reg_class_size[class] == CLASS_MAX_NREGS (class, mode))
op_costs[i].cost[class] = -1; {
if (reg_class_size[class] == 1)
op_costs[i].cost[class] = -1;
else
{
for (nr = 0; nr < HARD_REGNO_NREGS(regno, mode); nr++)
{
if (!TEST_HARD_REG_BIT (reg_class_contents[class], regno + nr))
break;
}
if (nr == HARD_REGNO_NREGS(regno,mode))
op_costs[i].cost[class] = -1;
}
}
} }
} }
......
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