Skip to content

Insert end_borrow for dead phi operands only when required #77568

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
Nov 13, 2024

Conversation

meg-gupta
Copy link
Contributor

DCE inserts end_borrow at phi operands when a guaranteed phi becomes dead. This should be done only for reborrows which end the lifetime of the incoming value. The existing check was not accurate and ended up inserting end_borrow for forwarded values as well.

Fixes rdar://139283745

DCE inserts end_borrow at phi operands when a guaranteed phi becomes dead.
This should be done for reborrows which end the lifetime of the incoming value.
The existing check was not accurate and ended up inserting end_borrow for forwarded values as well.

Fixes rdar://139283745
@meg-gupta meg-gupta requested a review from eeckstein as a code owner November 12, 2024 22:06
@meg-gupta
Copy link
Contributor Author

Can be merged after #77527

@meg-gupta
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

lgtm

@meg-gupta meg-gupta enabled auto-merge November 13, 2024 08:51
@meg-gupta meg-gupta merged commit 452ae3b into swiftlang:main Nov 13, 2024
4 of 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