On Mon, Oct 26, 2020 at 01:18:54PM +0000, Alex Coplan wrote: > - else if (GET_CODE (inner) == ASHIFT > + else if ((GET_CODE (inner) == ASHIFT || GET_CODE (inner) == MULT)
As I wrote in the other mail, write this as two cases. Write something in the comment for the mult one that this is for the canonicalisation of memory addresses (feel free to use swear words). > + { > + const HOST_WIDE_INT ci = INTVAL (XEXP (inner, 1)); > + const auto code = GET_CODE (inner); > + const HOST_WIDE_INT shift_amt = (code == MULT) ? exact_log2 (ci) : ci; > + > + if (shift_amt > 0 && len > (unsigned HOST_WIDE_INT)shift_amt) Space after cast; better is to not need a cast at all (and you do not need one, len is unsigned HOST_WIDE_INT already). Segher