Sorry, forgot a line: Richard Sandiford <rdsandif...@googlemail.com> writes: > Vladimir Makarov <vmaka...@redhat.com> writes: >> Index: rtlanal.c >> =================================================================== >> --- rtlanal.c (revision 192942) >> +++ rtlanal.c (working copy) >> @@ -5459,6 +5459,11 @@ strip_address_mutations (rtx *loc, enum >> else if (code == AND && CONST_INT_P (XEXP (*loc, 1))) >> /* (and ... (const_int -X)) is used to align to X bytes. */ >> loc = &XEXP (*loc, 0); >> + else if (code == SUBREG >> + && ! REG_P (XEXP (*loc, 0)) && ! MEM_P (XEXP (*loc, 0))) >> + /* (subreg (operator ...) ...) usually inside and is used for >> + mode conversion too. */ >> + loc = &XEXP (*loc, 0); > > I think the condition should be: > > else if (code == SUBREG > && !OBJECT_P (SUBREG_REG (*loc)) > && subreg_lowpart (*loc)) loc = &SUBREG_REG (*loc);
i.e. please use SUBREG_REG rather than XEXP.