cmd/compile: unnecessary sign-extensions when converting int's #34625
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 tested the behavior of the Go compiler when facing conversions from
int
touint
/int
values of different sizes.What did you expect to see?
I expected then to be compiled down to a single instruction in most cases (don't know if this assumption is correct).
What did you see instead?
Instead, they are compiled to two instructions.
Examples (not a complete list):
The text was updated successfully, but these errors were encountered: