Skip to content

IRGen: Large types reg2mem - Fix visitUncheckedTrivialBitCastInst #73626

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

An unchecked_trivial_bit_cast can go from a bigger type to a smaller type. Therefore we must allocate stack storage for the operand type rather than the result type. Otherwise, we can end up storing bigger values into smaller storage -- not good.

rdar://128086028

An unchecked_trivial_bit_cast can go from a bigger type to a smaller
type. Therefore we must allocate stack storage for the operand type
rather than the result type. Otherwise, we can end up storing bigger
values into smaller storage -- not good.

rdar://128086028
@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer
Copy link
Contributor Author

@swift-ci test

It imports the enum as a signed int rather than an unsigned int like on darwin
@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer aschwaighofer merged commit b5d9ff4 into swiftlang:main May 16, 2024
5 checks 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.

1 participant