-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
tail calls: Passing Indirect Operands into LLVM hits a span_bug #144855
Copy link
Copy link
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.F-explicit_tail_calls`#![feature(explicit_tail_calls)]``#![feature(explicit_tail_calls)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.F-explicit_tail_calls`#![feature(explicit_tail_calls)]``#![feature(explicit_tail_calls)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Essentially the meat of #144293 (comment) and #144232 (comment)
We want to resolve the
span_buginrust/compiler/rustc_codegen_ssa/src/mir/block.rs
Line 1059 in 7cd9505
LLVM is currently emitted wrongly for instances with indirect operands, mostly due to cleanup after the fact. Can see this by the MIR of
tests/ui/explicit-tail-call/recursion-etc-u64wrapper.rs:I believe the only real work involved would be migrating the bbs related to cleanup before the tailcall, or placing the object explicitly on the stack for LLVM's
byvalto clean it up for us.