Skip to content

[sil-combine] When promoting an unchecked_take_enum_data_addr + load -> load + unchecked_enum_data, make sure to handle the non-trivialness of the operand and the trivialness of the result correctly. #35795

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

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Feb 5, 2021

No description provided.

…-> load + unchecked_enum_data, make sure to handle the non-trivialness of the operand and the trivialness of the result correctly.
@gottesmm gottesmm requested a review from meg-gupta February 5, 2021 20:31
@gottesmm
Copy link
Contributor Author

gottesmm commented Feb 5, 2021

@swift-ci test

Copy link
Contributor

@meg-gupta meg-gupta left a comment

Choose a reason for hiding this comment

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

lgtm

// CHECK-LABEL: sil [ossa] @unchecked_take_enum_data_addr_promotion_trivialpayload_nontrivial_enum : $@convention(thin) (@inout NonTrivialLoadableEnum) -> Builtin.Int32 {
// CHECK-NOT: unchecked_take_enum_data_addr
// CHECK: unchecked_enum_data
// CHECK-NOT: unchecked_take_enum_data_addr
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe a CHECK line with the borrow would have made this more explicit.

@gottesmm gottesmm merged commit ff08ddb into swiftlang:main Feb 6, 2021
@gottesmm gottesmm deleted the pr-2d077ce18f48be0e71a0bcd29be8eadcf46adf9d branch February 6, 2021 01:52
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