Skip to content

[X86] Fix musttail miscompilation when arguments are passed on the stack#199691

Merged
rnk merged 3 commits into
llvm:mainfrom
mmasztalerczuk:mmasztalerczuk/199224
Jun 10, 2026
Merged

[X86] Fix musttail miscompilation when arguments are passed on the stack#199691
rnk merged 3 commits into
llvm:mainfrom
mmasztalerczuk:mmasztalerczuk/199224

Conversation

@mmasztalerczuk

Copy link
Copy Markdown
Contributor

After commit 782bf6a, a musttail call with matching CC was always treated as a sibcall, which skips the stores of outgoing stack arguments. Any non-forwarded stack argument was silently dropped.

Only treat musttail as a sibcall when every argument is in a register; otherwise fall back to full tail-call lowering.

Fix #199224

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression in LLVM 22: Cannot pass more than 6 arguments in "musttail" tail call on x86-64

4 participants