[llvm-commits] [llvm] r95195 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll test/CodeGen/X86/tailcallfp2.ll
Rafael Espindola
espindola at google.com
Thu Feb 4 08:16:44 PST 2010
>> short foo(void);
>> short bar(void) { return foo(); }
>>
>> Also, GCC declines the tailcall optimization for this code.
>
> I know. The question is whether that's just a missed optimization?
It is. With gcc 4.2 I get
call foo
addq $8, %rsp
cwtl
ret
But with 4.4 I get
jmp foo
There is a similar issues with function arguments:
http://gcc.gnu.org/ml/gcc/2009-03/msg00426.html
Unfortunately I never got a reply on that.
> Evan
Cheers.
--
Rafael Ávila de Espíndola
More information about the llvm-commits
mailing list