Skip to content

🍒 [AArch64] Skip storing of stack arguments when lowering tail calls #10810

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from

Conversation

guy-david
Copy link

Cherry-picks llvm#126735.

This issue starts in the selection DAG and causes the backend to emit the following for a trivial tail call:

ldr w8, [sp]
str w8, [sp]
b func

…lvm#126735)

This issue starts in the selection DAG and causes the backend to emit
the following for a trivial tail call:
```
ldr w8, [sp]
str w8, [sp]
b func
```

I'm not too sure that checking for immutability of a specific stack
object is a good enough of a gurantee, because as soon a tail-call is
done lowering,`setHasTailCall()` is called and in that case perhaps a
pass is allowed to change the value of the object in-memory?

This can be extended to the ARM backend as well.
Removed the `tailcall` keyword from a few other test assets, I'm
assuming their original intent was left intact.

(cherry picked from commit 4d4b7cc)
@guy-david guy-david requested a review from a team as a code owner June 8, 2025 11:22
@guy-david
Copy link
Author

@swift-ci test llvm

@guy-david
Copy link
Author

@swift-ci test

@guy-david guy-david closed this Jul 1, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant