postreload.c (move2add_note_store): Add reg_symbol_ref[] checks to update conditions.

* postreload.c (move2add_note_store): Add reg_symbol_ref[] checks
	to update conditions. Fix reg_mode[] check.

From-SVN: r164524
This commit is contained in:
Chung-Lin Tang 2010-09-22 14:38:08 +00:00 committed by Chung-Lin Tang
parent be6388e18a
commit 27d5e204ca
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2010-09-22 Chung-Lin Tang <cltang@codesourcery.com>
* postreload.c (move2add_note_store): Add reg_symbol_ref[] checks
to update conditions. Fix reg_mode[] check.
2010-09-22 Hariharan Sandanagobalane <hariharan@picochip.com>
* config/picochip/picochip.md (movhicc): Use expand to check whether

View File

@ -2104,15 +2104,17 @@ move2add_note_store (rtx dst, const_rtx set, void *data)
&& (MODES_OK_FOR_MOVE2ADD
(dst_mode, reg_mode[REGNO (XEXP (src, 1))])))
{
if (reg_base_reg[REGNO (XEXP (src, 1))] < 0)
if (reg_base_reg[REGNO (XEXP (src, 1))] < 0
&& reg_symbol_ref[REGNO (XEXP (src, 1))] == NULL_RTX)
offset = reg_offset[REGNO (XEXP (src, 1))];
/* Maybe the first register is known to be a
constant. */
else if (reg_set_luid[REGNO (base_reg)]
> move2add_last_label_luid
&& (MODES_OK_FOR_MOVE2ADD
(dst_mode, reg_mode[REGNO (XEXP (src, 1))]))
&& reg_base_reg[REGNO (base_reg)] < 0)
(dst_mode, reg_mode[REGNO (base_reg)]))
&& reg_base_reg[REGNO (base_reg)] < 0
&& reg_symbol_ref[REGNO (base_reg)] == NULL_RTX)
{
offset = reg_offset[REGNO (base_reg)];
base_reg = XEXP (src, 1);