Skip to content

[6.1] Fix array bounds check optimization for ossa #78253

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 1 commit into from
Dec 21, 2024

Conversation

meg-gupta
Copy link
Contributor

Explanation: While hoisting check_subscript call in ossa, isNativeTypeChecked call is also created in the preheader. The array value used in the isNativeTypeChecked may not be available if its lifetime had ended before. Proactively set the array value of the isNativeTypeChecked call to the array value in the check_subscript call.
Scope: This fixes an ownership verification error in ArrayBoundsCheckOptimizations.
Original PR: #78231
Risk: Low
Testing: Swift CI testing
Reviewed by: @eeckstein
Issue: rdar://141630349

@meg-gupta meg-gupta changed the title Fix array bounds check optimization for ossa [6.1] Fix array bounds check optimization for ossa Dec 17, 2024
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta marked this pull request as ready for review December 19, 2024 19:04
@meg-gupta meg-gupta requested a review from a team as a code owner December 19, 2024 19:04
@meg-gupta meg-gupta enabled auto-merge December 19, 2024 19:26
While hoisting check_subscript call in ossa, isNativeTypeChecked call is also hoisted.
The array value used in the isNativeTypeChecked may not be available if it's lifetime
had ended before. Proactively set the array value of the isNativeTypeChecked call to
the array value in the check_subscript call.
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta merged commit eaada37 into swiftlang:release/6.1 Dec 21, 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.

2 participants