Open
Description
The following rust code should get tail calls:
pub fn moo() -> String {
goo()
}
#[inline(never)]
pub fn goo() -> String {
"https://".to_string()
}
Instead we get:
example::moo:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call example::goo@PLT
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
ret
example::goo:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rsi, [rip + str.0]
mov edx, 8
call <alloc::string::String as core::convert::From<&'a str>>::from@PLT
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
ret
str.0:
.ascii "https://"