Skip to content
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

Avoid emitting redundant locals in deconstruction assignment #65832

Merged
merged 5 commits into from
Dec 8, 2022

Conversation

alrz
Copy link
Member

@alrz alrz commented Dec 7, 2022

Fixes #38702

@alrz alrz requested a review from a team as a code owner December 7, 2022 12:34
@ghost ghost added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Dec 7, 2022
@AlekseyTs
Copy link
Contributor

@alrz Does the title of the PR, "Deconstructing pairwise assignments won't be used", accurately reflect the nature of the change?

@alrz alrz changed the title Deconstructing pairwise assignments won't be used Avoid emitting redundant locals in deconstruction assignment Dec 7, 2022
@alrz
Copy link
Member Author

alrz commented Dec 7, 2022

Probably not. I'm out of ideas for this one actually

@AlekseyTs
Copy link
Contributor

Consider adding a test for scenario from #38702.

@RikkiGibson
Copy link
Contributor

#50784 also reported this issue.

@alrz
Copy link
Member Author

alrz commented Dec 8, 2022

@RikkiGibson This doesn't repro with fields.

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

LGTM (commit 5)

@AlekseyTs
Copy link
Contributor

@dotnet/roslyn-compiler For the second review

@333fred 333fred merged commit 9915907 into dotnet:main Dec 8, 2022
@ghost ghost added this to the Next milestone Dec 8, 2022
@333fred
Copy link
Member

333fred commented Dec 8, 2022

Thanks @alrz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The compiler produces code with useless redundant instructions for (X, Y) = (x, y)
5 participants