Skip to content

CastOptimizer: A load store to the existential box is not valid on ad… #17113

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

Conversation

aschwaighofer
Copy link
Contributor

…dress only types

rdar://40949457

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test and merge

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test and merge

1 similar comment
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test and merge

@aschwaighofer aschwaighofer merged commit ae5715e into swiftlang:master Jun 11, 2018
@atrick
Copy link
Contributor

atrick commented Jun 12, 2018

@aschwaighofer I don't see anything in the code that communicates this invariant. For example, I at least want to see a comment in the unit test explaining why a copy_addr needs to be emitted. Maybe a comment in the code explaining the same. Can SILVerifier catch this?

@aschwaighofer
Copy link
Contributor Author

@atrick The invariant is that you can't load address-only types. That is a pretty fundamental property in SIL. At least for now.

This is not enforced by the SIL verifier apparently (because I think this was tripping up in IRGen in a non-assert build). It will trip an assert in an asserts build. I forgot whether it was the SILBuilder or the the LoadInst constructor.

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