Skip to content

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Dec 7, 2021

This cherry-picks a change from main that ensures that async returns use ret void rather than unreachable on targets which do not support the LLVM musttail instruction. Unfortunately, Windows does not support the musttail instruction as the PEI does not handle the lowering of the frame properly yet.

kateinoigakukun and others added 2 commits December 7, 2021 15:40
If target doesn't support musttail (e.g. WebAssembly), the function
passed to coro.end.async can return control back to the caller.
So the frontend should emit 'ret void' instead of unreachable after the
coro.end.async intrinsic call to allow such situation.

(cherry picked from commit 671ce74)
The change in 39680 impacts more than WebAssembly, but it did not update
the tests for impacted targets.

(cherry picked from commit 3df2531)
@compnerd compnerd requested a review from a team as a code owner December 7, 2021 15:59
@compnerd
Copy link
Member Author

compnerd commented Dec 7, 2021

CC: @DougGregor

@compnerd
Copy link
Member Author

compnerd commented Dec 7, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Dec 7, 2021

Build failed
Swift Test OS X Platform
Git Sha - 9fbf41c

@compnerd
Copy link
Member Author

compnerd commented Dec 7, 2021

@swift-ci please test macOS platform

@tkremenek
Copy link
Member

@aschwaighofer can you quickly review this to confirm this is limited in scope and kosher to pull in a dot-dot release?

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DougGregor DougGregor merged commit c1776ee into swiftlang:release/5.5 Dec 7, 2021
@compnerd compnerd deleted the ret-void branch December 7, 2021 23:17
Copy link

@Cearl03 Cearl03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed

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.

7 participants