]> Cypherpunks repositories - gostls13.git/commit
internal/runtime/sys,math/bits: eliminate bounds checks on len8tab
authorJoel Sing <joel@sing.id.au>
Wed, 5 Nov 2025 14:05:29 +0000 (01:05 +1100)
committerGopher Robot <gobot@golang.org>
Mon, 10 Nov 2025 17:48:20 +0000 (09:48 -0800)
commitbc5ffe5c79d45447648a012465e158f29ff5efa2
treec8cf367793a23859cd1c98c8ef24bbcc4697f3aa
parent32f8d6486f02d5820977180c52889ec72c799d58
internal/runtime/sys,math/bits: eliminate bounds checks on len8tab

The compiler cannot currently determine that the accesses to len8tab
are within bounds. Cast to uint8 to avoid unnecessary bounds checks.

Fixes #76166

Change-Id: I1fd930bba2b20d3998252c476308642e08ce00b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/718040
Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Auto-Submit: Joel Sing <joel@sing.id.au>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/internal/runtime/sys/intrinsics.go
src/math/bits/bits.go