Skip to content

Bailout from an illegal transformation in semantic arc opts #83052

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Jul 14, 2025

tryJoinIfDestroyConsumingUseInSameBlock replaces a copy with its operand when there is no use of the copy's operand between the copy's forwarded consuming use and the copy operand's destroy in the same block. It is illegal to do this transformation when there is a non-consuming use of the copy operand after the forwarded consuming use of the copy.

The code checking this illegal case was not considerin the case where the consuming use of the copy was in the same instruction as the non-consuming use of the copy operand.

rdar://154712867

tryJoinIfDestroyConsumingUseInSameBlock replaces a copy with its operand
when there is no use of the copy's operand between the copy's forwarded consuming use
and the copy operand's destroy in the same block. It is illegal to do this transformation
when there is a non-consuming use of the copy operand after the forwarded consuming use of the copy.

The code checking this illegal case was not considerin the case where the consuming use of the copy
was in the same instruction as the non-consuming use of the copy operand.

rdar://154712867
@meg-gupta meg-gupta requested a review from eeckstein as a code owner July 14, 2025 23:40
@meg-gupta meg-gupta requested review from nate-chandler and atrick and removed request for eeckstein July 14, 2025 23:40
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta requested a review from eeckstein July 15, 2025 00:05
@meg-gupta meg-gupta enabled auto-merge July 15, 2025 10:22
@meg-gupta
Copy link
Contributor Author

@swift-ci test macOS platform

@meg-gupta
Copy link
Contributor Author

@swift-ci test windows platform

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