Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[IRGen] Put 'ret void' instead of unreachable for non swiftasync cc #39680

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Oct 11, 2021

If target doesn't support musttail (e.g. WebAssembly, it's available only under feature flag), 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.

Detail investigation report is here: swiftwasm#3646

@kateinoigakukun
Copy link
Member Author

preset=buildbot_incremental_linux_crosscompile_wasm
@swift-ci please test with preset Linux Platform

@kateinoigakukun

This comment has been minimized.

@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test

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.
@kateinoigakukun kateinoigakukun force-pushed the katei/fix-ill-unreachable-coro-end branch from c460835 to 671ce74 Compare October 11, 2021 16:09
@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test

@MaxDesiatov
Copy link
Contributor

@swift-ci please smoke test macOS platform

@kateinoigakukun
Copy link
Member Author

Gentle ping :)

@DougGregor
Copy link
Member

@swift-ci please smoke test and merge

@DougGregor
Copy link
Member

Actually, we shouldn't need the re-test here, since it's so isolated.

@DougGregor DougGregor merged commit 0398252 into swiftlang:main Dec 7, 2021
@kateinoigakukun kateinoigakukun deleted the katei/fix-ill-unreachable-coro-end branch December 7, 2021 01:15
compnerd added a commit to compnerd/apple-swift that referenced this pull request Dec 7, 2021
The change in 39680 impacts more than WebAssembly, but it did not update
the tests for impacted targets.
compnerd added a commit to compnerd/apple-swift that referenced this pull request Dec 7, 2021
The change in 39680 impacts more than WebAssembly, but it did not update
the tests for impacted targets.

(cherry picked from commit 3df2531)
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.

3 participants