[Bug rtl-optimization/107167] It looks like GCC wastes registers on trivial computations when result can be cached
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Oct 6 05:55:55 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107167
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Keywords| |missed-optimization
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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
More information about the Gcc-bugs
mailing list