[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
Thu Oct 6 06:05:50 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107167
--- Comment #4 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #1)
> Plus your example might be slower due to dependencies.
Dependency is only an issue to a certain degree. 1st one it has things like
"movl %edi, %edx; rorl $11, %edx" which is also a flow dependency.
CPU solves flow dependency to a very large degree with register forwarding.
Write dependencies are also dealt with register renaming if we save registers,
register renaming will also save time.
More information about the Gcc-bugs
mailing list