cmd/compile: fold IsInBounds of modulo.
In b we only need the division by 0 check. func b(i uint, v []byte) byte { return v[i%uint(len(v))] } Updates #15079. Change-Id: Ic7491e677dd57cd6ba577efbce576dbb6e023cbd Reviewed-on: https://go-review.googlesource.com/21502 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Ahmed Waheed <oneofone@gmail.com>
Showing
Please register or sign in to comment