[Bug rtl-optimization/107167] It looks like GCC wastes registers on trivial computations when result can be cached

unlvsur at live dot com gcc-bugzilla@gcc.gnu.org
Fri Oct 7 01:41:09 GMT 2022


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

--- Comment #6 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #5)
> You already filed this one.
> 
> *** This bug has been marked as a duplicate of bug 103550 ***

(In reply to Andrew Pinski from comment #1)
> This is a reassociation, scheduling issue and register allocation issue.
> 
> Plus your example might be slower due to dependencies.
> 
> Without a full example of where gcc ra goes wrong, gcc actually produces
> much better code for this example due to register renaming in hw.
> Note many x86_64 also does register renaming for the stack too

On x86_64, I just checked uops.info, only two ports are available for
rotr,rotl. They cannot really get paralleled executed.


More information about the Gcc-bugs mailing list