Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing tailcall optimization #28791

Closed
llvmbot opened this issue Jul 4, 2016 · 2 comments
Closed

missing tailcall optimization #28791

llvmbot opened this issue Jul 4, 2016 · 2 comments
Labels
bugzilla Issues migrated from bugzilla duplicate Resolved as duplicate llvm:codegen

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 4, 2016

Bugzilla Link 28417
Resolution DUPLICATE
Resolved on May 11, 2020 07:59
Version 3.8
OS Linux
Reporter LLVM Bugzilla Contributor
CC @Kojoley

Extended Description

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()

@Kojoley
Copy link
Contributor

Kojoley commented May 11, 2020

*** This bug has been marked as a duplicate of bug #8605 ***

@Kojoley
Copy link
Contributor

Kojoley commented Nov 27, 2021

mentioned in issue #8605

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla duplicate Resolved as duplicate llvm:codegen
Projects
None yet
Development

No branches or pull requests

2 participants