https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60851
--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> --- I have a patch in testing: --cut here-- Index: recog.c =================================================================== --- recog.c (revision 221482) +++ recog.c (working copy) @@ -2775,6 +2775,10 @@ constrain_operands (int strict, alternative_mask a /* Before reload, accept what reload can turn into mem. */ || (strict < 0 && CONSTANT_P (op)) + /* Before reload, accept a pseudo, + since LRA can turn it into mem. */ + || (targetm.lra_p () && strict < 0 && REG_P (op) + && REGNO (op) >= FIRST_PSEUDO_REGISTER) /* During reload, accept a pseudo */ || (reload_in_progress && REG_P (op) && REGNO (op) >= FIRST_PSEUDO_REGISTER))) --cut here-- The patch activates "safety net" recognition of pseudo regs for LRA-enabled targets. LRA is able to spill pseudos to memory to satisfy memory-only constraints, so constrain_operands should recognize this functionality. This is actually the same approach as how constants are handled a couple of lines above.