Commit ca769828 by Richard Kenner

(push_reload, find_reloads): If an operand is a SUBREG of a PLUS,

force a reload and reload what is inside.

From-SVN: r5814
parent 98c131c3
...@@ -615,7 +615,7 @@ push_reload (in, out, inloc, outloc, class, ...@@ -615,7 +615,7 @@ push_reload (in, out, inloc, outloc, class,
} }
/* If we are reloading a (SUBREG constant ...), really reload just the /* If we are reloading a (SUBREG constant ...), really reload just the
inside expression in its own mode. inside expression in its own mode. Similarly for (SUBREG (PLUS ...)).
If we have (SUBREG:M1 (MEM:M2 ...) ...) (or an inner REG that is still If we have (SUBREG:M1 (MEM:M2 ...) ...) (or an inner REG that is still
a pseudo and hence will become a MEM) with M1 wider than M2 and the a pseudo and hence will become a MEM) with M1 wider than M2 and the
register is a pseudo, also reload the inside expression. register is a pseudo, also reload the inside expression.
...@@ -639,6 +639,7 @@ push_reload (in, out, inloc, outloc, class, ...@@ -639,6 +639,7 @@ push_reload (in, out, inloc, outloc, class,
if (in != 0 && GET_CODE (in) == SUBREG if (in != 0 && GET_CODE (in) == SUBREG
&& (CONSTANT_P (SUBREG_REG (in)) && (CONSTANT_P (SUBREG_REG (in))
|| GET_CODE (SUBREG_REG (in)) == PLUS
|| strict_low || strict_low
|| (((GET_CODE (SUBREG_REG (in)) == REG || (((GET_CODE (SUBREG_REG (in)) == REG
&& REGNO (SUBREG_REG (in)) >= FIRST_PSEUDO_REGISTER) && REGNO (SUBREG_REG (in)) >= FIRST_PSEUDO_REGISTER)
...@@ -2599,9 +2600,10 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) ...@@ -2599,9 +2600,10 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
{ {
offset += SUBREG_WORD (operand); offset += SUBREG_WORD (operand);
operand = SUBREG_REG (operand); operand = SUBREG_REG (operand);
/* Force reload if this is a constant or if there may may /* Force reload if this is a constant or PLUS or if there may may
be a problem accessing OPERAND in the outer mode. */ be a problem accessing OPERAND in the outer mode. */
if (CONSTANT_P (operand) if (CONSTANT_P (operand)
|| GET_CODE (operand) == PLUS
#ifdef LOAD_EXTEND_OP #ifdef LOAD_EXTEND_OP
/* If we have a SUBREG where both the inner and outer /* If we have a SUBREG where both the inner and outer
modes are different size but no wider than a word, modes are different size but no wider than a word,
......
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