]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssagen: use an alias for math/bits.Len
authorJoel Sing <joel@sing.id.au>
Wed, 12 Mar 2025 11:55:49 +0000 (22:55 +1100)
committerGopher Robot <gobot@golang.org>
Wed, 12 Mar 2025 16:04:33 +0000 (09:04 -0700)
commit7e8ceadf85d1b0fc177ef0754f779a7a87b2c2b9
tree775b6da52d7a862c1d87184f1523bc515fa54bfa
parenta812e5f3c3b239ae7634bbec2b0942bcf91ae147
cmd/compile/internal/ssagen: use an alias for math/bits.Len

Rather than using a specific intrinsic for math/bits.Len, use a pair of
aliases instead. This requires less code and automatically adapts when
platforms have a math/bits.Len32 or math/bits.Len64 intrinsic.

Change-Id: I28b300172daaee26ef82a7530d9e96123663f541
Reviewed-on: https://go-review.googlesource.com/c/go/+/656995
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
src/cmd/compile/internal/ssagen/intrinsics.go