Skip to content

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants