Skip to content

SILOptimizer: fix a compiler crash when optimizing a global variable with an empty tuple. #36447

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

Merged
merged 2 commits into from
Mar 16, 2021

Conversation

eeckstein
Copy link
Contributor

@eeckstein eeckstein commented Mar 16, 2021

The first fix is in GlobalOpt: bail is the initializer instructions of a global variable contain "undef"

But also fix SILMem2Reg to not create an "undef" as a replacement of a load of an empty tuple.
In general, it's not a good idea to create undef values in SIL.

https://bugs.swift.org/browse/SR-14342
rdar://75364429

…empty tuple.

Instead create the empty tuple value.
In general, it's not a good idea to create undef values in SIL.
…contain "undef"

Fixes a compiler crash

rdar://75364429
@eeckstein
Copy link
Contributor Author

@swift-ci test

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.

1 participant