https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62173
--- Comment #5 from Jiong Wang <jiwang at gcc dot gnu.org> --- The root cause is AArch64's TARGET_LEGITIMIZE_ADDRESS are not doing well when the input is ((reg + reg) + offset). looks like currently we have considered reg + non_normal_offset, and trying to split non_normal_offset to base + offset. while for ((reg1 + reg2) + offset), if reg + offset is valid, then we should legitimize it to reg3 = reg1 + offset return reg3 + reg2 will send out the patch after pass tests and benchmarking.