[Bug rtl-optimization/122919] Unnecessary duplication of shifts with computed goto
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 1 07:18:24 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122919
--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #4)
> Here's another test case, which has two full divisions:
Of course, it does not. I meant "exhibits the two shrq instructions".
There is no need to use %rax in
movq %rdx, %rax
shrq $3, %rdx
shrq $3, %rax
andl $4294967295, %edx
leaq (%rax,%rax,4), %rcx
(with no further use of the value in %rax)
More information about the Gcc-bugs
mailing list