cmd/compile: optimize conditional pointer assignment #34020
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
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 function (https://godbolt.org/z/rRkMVJ):
What did you expect to see?
I expected that the generated instructions would be similar to https://godbolt.org/z/q0k3NT
What did you see instead?
Instead, there are
MOV
instructions to temporary stack variables and there is no use of theCMOV
instruction.The text was updated successfully, but these errors were encountered: