> I would first ask why subreg_get_info is being called with ymode == > QImode for a hard register which can not hold QImode. That implies > that there is a QImode value in the register, which you say is > invalid.
Are there any ports besides m32c that have registers which can hold HI (or SI I suppose) but not QI values? What I've done as a workaround is check for the zero and fail nicely: Index: rtlanal.c =================================================================== --- rtlanal.c (revision 131405) +++ rtlanal.c (working copy) @@ -3135,12 +3135,20 @@ subreg_get_info (unsigned int xregno, en else info->offset = 0; info->nregs = nregs_ymode; return; } + if (nregs_ymode == 0) + { + info->representable_p = false; + info->nregs = 1; + info->offset = offset; + return false; + } + /* If registers store different numbers of bits in the different modes, we cannot generally form this subreg. */ if (!HARD_REGNO_NREGS_HAS_PADDING (xregno, xmode) && !HARD_REGNO_NREGS_HAS_PADDING (xregno, ymode) && (GET_MODE_SIZE (xmode) % nregs_xmode) == 0 && (GET_MODE_SIZE (ymode) % nregs_ymode) == 0)