]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: compute bits.TrailingZeros*'s limits from argument's limits
authorJorropo <jorropo.pgm@gmail.com>
Wed, 7 Aug 2024 20:16:00 +0000 (22:16 +0200)
committerKeith Randall <khr@golang.org>
Tue, 3 Sep 2024 16:38:49 +0000 (16:38 +0000)
commitf49fe2955de792377d2a0411531bb95d745e1d9b
tree0ec66f6dc71ccbd222e82777595d4be5c7e718a9
parent090f03fd2f276341d1d93fc289fe346d44b0f4be
cmd/compile: compute bits.TrailingZeros*'s limits from argument's limits

y := bits.TrailingZeros(x)
if y > bits.Len(x.umax)-1 {
 then must always be true 1 << y > x.umax which is impossible
}

Change-Id: Iab4fce1c2ef828bee3a8a4a977cbadb5f9333136
Reviewed-on: https://go-review.googlesource.com/c/go/+/603996
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/prove.go
test/prove.go