[Bug rtl-optimization/110479] Unnecessary register move
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 29 12:41:20 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110479
--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Thomas Koenig from comment #0)
> movl %edi, %ecx
This one? It is needed because SAL wants its count argument in %cl and first
argument is passed in %edi (mandated by x86_64 ABI).
With -mbmi2, one gets:
shrl $10, %edi
movl $1, %eax
andl $3, %edi
addl $3, %edi
shlx %edi, %eax, %eax
ret
More information about the Gcc-bugs
mailing list