https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124439
--- Comment #14 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- (In reply to Robin Dapp from comment #13) > (In reply to Vladimir Makarov from comment #11) > > (In reply to Robin Dapp from comment #4) > > > > > > So when deleting insn 11 we assume that all uses will be replaced. The > > > way > > > it's written, I suppose that's a basic assumption of lra. > > > > > > > > Yes, that is right. Although there is an exception like reverse memory > > equivalence. > > > > So the original patch for PR124041 was wrong. It was my mistake that I > > approved it. > > > > I'll work on the original PR124041 to fix it and this PR. > > Thanks, so at least this assumption was correct :) > Do you want me to revert the patch or are you just going the remove the > bogus hunk along with your fix? No, thanks. I think I'll fix it all tomorrow anyway. The original problem should be fixed in process_alt_operands which will decide that we need reload of the equivalent substitution. We could fix it in curr_insn_transform by generating reload of the equiv substitution but recent introduction of postponed insns prevents this as we can not generate reloads before return on the postpone insn. And I think the fix in process_alt_operands will be smaller.
