cmd/compile: double assignment not optimized #31172
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
I compiled the following code (simplified from a more complex program):
What did you expect to see?
I expected the double assignment to be compiled away, as in the code presented below:
What did you see instead?
Instead, the following code was generated:
Note: Before commit 69c2c56, the code snippets shown above behaved similarly.
The text was updated successfully, but these errors were encountered: