https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212
--- Comment #369 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Oleg Endo from comment #346) > > ... I've noticed that this is the same as the existing > MAYBE_BASE_REGISTER_RTX_P. > > I've inserted a patch into the stash to tighten all the existing memory > predicates and constraints to use MAYBE_BASE_REGISTER_RTX_P and > MAYBE_INDEX_REGISTER_RTX_P. As a result your added check in > 'general_mov{dst,src}_operand' becomes unnecessary, but I've left it in > anyway. > > This is the patch > https://github.com/olegendo/gcc/commit/ > 9636a55a071fd9b9acc3a38fb25799fc70177d28 > > I think this kind of thing could be already upstreamed after reg-testing > without LRA, it's a good catch. I've tested this patch on mainline with LRA disabled and it doesn't work as-is. I'm now trying to modify the patch. If it doesn't work, then maybe we have to consider to drop non-LRA support entirely as part of the migration to LRA. I was hoping to avoid that, and keep the '-mno-lra' option around for one or two major versions ...