> What do you think we should relax it to though? Obviously there's a balance > here between relaxing things enough and not relaxing them too far (so that > the EImode AArch64 thing I mentioned is still a noisy failure, for > example). ISTM the patch deals with the only significant case that is > obviously safe for modes that are not a power of 2 in size.
Apparently the change wants to accept general subregs with not only modes whose sizes are multiple of each other but also whose sizes are multiple of a common large enough value. That clearly goes against: /* This should always pass, otherwise we don't know how to verify the constraint. These conditions may be relaxed but subreg_regno_offset would need to be redesigned. */ gcc_assert ((GET_MODE_SIZE (xmode) % GET_MODE_SIZE (ymode)) == 0); gcc_assert ((nregs_xmode % nregs_ymode) == 0); so I think that we should formulate the new requirement and implement it in the main part of the function, instead of adding it as a kludge. > If you're saying that the condition itself is OK, but that the code should > be further down in the function, then I don't think that would gain much. > We already have early-outs for the simple cases, such as: Right, but they are more of special cases and this one is not. -- Eric Botcazou