> This part suggests to me that LRA should never be reloading the > paradoxical subreg meaning the whole SLOW_UNALIGNED_ACCESS checking code in > simplify_operand_subreg could be removed unconditionally.
Why? For a little-endian target which is neither strict-alignment nor WORD_REGISTER_OPERATIONS, typically x86, you can reload the outer reg. Problems arise only for big-endian or strict-alignment or W_R_O, as explained by the find_reloads code. IOW simplify_operand_subreg should mimic the handling of paradoxical SUBREGs done by find_reloads, with specific checks for WORD_REGISTER_OPERATIONS, BYTES_BIG_ENDIAN, etc. > Eric: I see you recently had to modify the code I'm talking about in the > post below. Out of interest... was this another issue brought to light by > the improvements to zero extension elimination? Nope, there were a couple of other, unrelated bugs in the code. -- Eric Botcazou