Commit f353588a by Richard Kenner

(insert): Don't put a REG into qty_const.

From-SVN: r10607
parent de3cb7c3
...@@ -1371,20 +1371,22 @@ insert (x, classp, hash, mode) ...@@ -1371,20 +1371,22 @@ insert (x, classp, hash, mode)
update `qty_const_insn' to show that `this_insn' is the latest update `qty_const_insn' to show that `this_insn' is the latest
insn making that quantity equivalent to the constant. */ insn making that quantity equivalent to the constant. */
if (elt->is_const && classp && GET_CODE (classp->exp) == REG) if (elt->is_const && classp && GET_CODE (classp->exp) == REG
&& GET_CODE (x) != REG)
{ {
qty_const[reg_qty[REGNO (classp->exp)]] qty_const[reg_qty[REGNO (classp->exp)]]
= gen_lowpart_if_possible (qty_mode[reg_qty[REGNO (classp->exp)]], x); = gen_lowpart_if_possible (qty_mode[reg_qty[REGNO (classp->exp)]], x);
qty_const_insn[reg_qty[REGNO (classp->exp)]] = this_insn; qty_const_insn[reg_qty[REGNO (classp->exp)]] = this_insn;
} }
else if (GET_CODE (x) == REG && classp && ! qty_const[reg_qty[REGNO (x)]]) else if (GET_CODE (x) == REG && classp && ! qty_const[reg_qty[REGNO (x)]]
&& ! elt->is_const)
{ {
register struct table_elt *p; register struct table_elt *p;
for (p = classp; p != 0; p = p->next_same_value) for (p = classp; p != 0; p = p->next_same_value)
{ {
if (p->is_const) if (p->is_const && GET_CODE (p->exp) != REG)
{ {
qty_const[reg_qty[REGNO (x)]] qty_const[reg_qty[REGNO (x)]]
= gen_lowpart_if_possible (GET_MODE (x), p->exp); = gen_lowpart_if_possible (GET_MODE (x), p->exp);
......
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