cmd/compile: unnecessary bounds checks are not removed #14808
Please answer these questions before submitting your issue. Thanks!
I composed a list of bounds checks that the compiler at tip can and cannot eliminate. For some I provided an alternative implementation.
A case that maybe could be added to the doc above and loopbce.go is when writing to an array/slice from back to front e.g. for integer formatting:
This currently generates bounds checks but when writing the above with i = 0; i < len(buf); i++ the bounds checks are removed.