[Bug rtl-optimization/89676] [7/8/9 Regression] Redundant moves for long long shift on 32bit x86

vmakarov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 20 22:18:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89676

--- Comment #7 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
> 
> That said, if you can handle it in the RA, it could handle even those
> variable shift cases better (just make sure it doesn't overlap ecx, but
> otherwise allow the same reg as the first input).

I believe it should be fixed in RA.  It is a common case: earlyclobber output
with a matched input.  Currently they are conflicting and this results in worse
code generation.

Building conflict is now pretty complicated in LRA.  My idea is to reload and
use one reload register for the output and input even if their allocations
satisfy such constraints.  Actually, it is also good with LRA design to reflect
RA decisions in RTL as much as possible.


More information about the Gcc-bugs mailing list