https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92905
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, it isn't about <g>, using r<i>m in the first alternative of the reverted define_insn works well too, as well as swapping the alternatives (that is in that case basically what the trunk has, except in the second alternative the second input is r<i>m instead of m. If the second alternative of second input is <i>m, it works the same as current trunk (unnecessary spill), if it is rm, it works well. Now, no idea if this isn't a bug in LRA or if there are some rules that the seemingly redundant constraints actually aren't redundant.