cmd/compile: unneeded bounds checks #34816
Open
Labels
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 functions to check if there were any bounds checks: https://godbolt.org/z/RSrNwR.
What did you expect to see?
I expected to see no bounds checks.
What did you see instead?
Instead, I see 7 different bounds checks generated by the Go compiler (highlighted in the site above).
I talked with @zdjones about this and it appears like all these bounds checks can be removed.
The text was updated successfully, but these errors were encountered: