]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssagen: use an alias for math/bits.OnesCount
authorJoel Sing <joel@sing.id.au>
Wed, 19 Mar 2025 13:09:52 +0000 (00:09 +1100)
committerGopher Robot <gobot@golang.org>
Thu, 20 Mar 2025 15:15:01 +0000 (08:15 -0700)
commit03cb8d408e0372693f165b63dff1410c47d9cd1b
treeb3b788e5d83894dbba6e3fce2a6a75e7bae24b97
parentaf0d51c70fe18f860572767d6accdedb7f180358
cmd/compile/internal/ssagen: use an alias for math/bits.OnesCount

Currently, only amd64 has an intrinsic for math/bits.OnesCount, which
generates the same code as math/bits.OnesCount64. Replace this with
an alias that maps math/bits.OnesCount to math/bits.OnesCount64 on
64 bit platforms.

Change-Id: Ifa12a2173a201aacd52c3c22b9a948be6e314405
Reviewed-on: https://go-review.googlesource.com/c/go/+/659215
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ssagen/intrinsics.go
src/cmd/compile/internal/ssagen/intrinsics_test.go