diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-11-26 14:47:28 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-11-26 14:47:28 -0500 |
commit | f353588adaad75336ab10149afdb0728be08830d (patch) | |
tree | 5f3cd5d9779bef7cbe5fbfd8a11fab898620ca07 /gcc/cse.c | |
parent | de3cb7c346e71aa17e37bc48c19105c9fa2cb772 (diff) | |
download | gcc-f353588adaad75336ab10149afdb0728be08830d.zip gcc-f353588adaad75336ab10149afdb0728be08830d.tar.gz gcc-f353588adaad75336ab10149afdb0728be08830d.tar.bz2 |
(insert): Don't put a REG into qty_const.
From-SVN: r10607
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1371,20 +1371,22 @@ insert (x, classp, hash, mode) update `qty_const_insn' to show that `this_insn' is the latest 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)]] = gen_lowpart_if_possible (qty_mode[reg_qty[REGNO (classp->exp)]], x); 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; 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)]] = gen_lowpart_if_possible (GET_MODE (x), p->exp); |