Finally, reload the inner expression if it is a register that is in
the class whose registers cannot be referenced in a different size
- and M1 is not the same size as M2. */
+ and M1 is not the same size as M2. If SUBREG_WORD is nonzero, we
+ cannot reload just the inside since we might end up with the wrong
+ register class. */
- if (in != 0 && GET_CODE (in) == SUBREG
+ if (in != 0 && GET_CODE (in) == SUBREG && SUBREG_WORD (in) == 0
#ifdef CLASS_CANNOT_CHANGE_SIZE
&& class != CLASS_CANNOT_CHANGE_SIZE
#endif
storing in a subreg is entitled to clobber it all
(except in the case of STRICT_LOW_PART,
and in that case the constraint should label it input-output.) */
- if (out != 0 && GET_CODE (out) == SUBREG
+ if (out != 0 && GET_CODE (out) == SUBREG && SUBREG_WORD (out) == 0
#ifdef CLASS_CANNOT_CHANGE_SIZE
&& class != CLASS_CANNOT_CHANGE_SIZE
#endif