[Bug target/95076] Failure to tail-call on function call of different return type
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 12 12:02:37 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95076
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Failure to optimize out |Failure to tail-call on
|stack alignment on function |function call of different
|call of different type on |return type
|x86 |
CC| |hjl.tools at gmail dot com
Target| |x86_64-*-* i?86-*-*
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC doesn't tail-call because the return types are not compatible. With a call
it cannot optimize the stack adjustment because of the ABI.
Note I'm not sure whether the ABI allows %rax to contain "garbage" in the
upper half for a function returning in %eax. So what LLVM does may be wrong.
More information about the Gcc-bugs
mailing list