For this code LLVM generates code that doesn't use tailcall optimization. struct token { char const* tok_start; char const* tok_end; int tok_type; unsigned identifier_hash; }; token f(); token g() { return f(); } Generated code: g(): # @g() pushq %rbx movq %rdi, %rbx callq f() movq %rbx, %rax popq %rbx retq Expected code: g(): # @g() jmpq f()
*** This bug has been marked as a duplicate of bug 8233 ***