[Bug tree-optimization/87205] Inefficient code generation for switch
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 4 18:29:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87205
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
> ```
> h(unsigned int, void*):
> cmp edi, 5
> jbe .L5
> .L5:
> mov rdi, rsi
> jmp f(X*)
> ```
>
> https://godbolt.org/z/2Lh_GZ
Good, my patch can handle that and can generate direct call:
_Z1hjPv:
.LFB0:
.cfi_startproc
movq %rsi, %rdi
jmp _Z1fP1X
.cfi_endproc
More information about the Gcc-bugs
mailing list