[Bug rtl-optimization/124439] [16 regression] libgnat miscompiled on riscv64 since r16-7891-g4bcf6c461a9b8f
vmakarov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 17 19:20:56 GMT 2026
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.
More information about the Gcc-bugs
mailing list