]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use math/bits functions where possible
authorMichael Munday <mike.munday@ibm.com>
Wed, 16 May 2018 10:21:18 +0000 (11:21 +0100)
committerMichael Munday <mike.munday@ibm.com>
Mon, 21 May 2018 09:20:25 +0000 (09:20 +0000)
commit5654114d04291be151ff1b1dda09d5b96e0601fa
treed150e6693c4b3d53fa711e763c1d4d8933372271
parentcc09212f59ee215cae5345dc1ffcd1ed81664e1b
cmd/compile: use math/bits functions where possible

Use the math/bits functions to calculate the number of leading/
trailing zeros, bit length and the population count.

The math/bits package is built as part of the bootstrap process
so we do not need to provide an alternative implementation for
Go versions prior to 1.9.

Passes toolstash-check -all.

Change-Id: I393b4cc1c8accd0ca7cb3599d3926fa6319b574f
Reviewed-on: https://go-review.googlesource.com/113336
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/ssa/bits_bootstrap.go [deleted file]
src/cmd/compile/internal/ssa/bits_go19.go [deleted file]
src/cmd/compile/internal/ssa/debug.go
src/cmd/compile/internal/ssa/rewrite.go