diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2019-04-20 11:09:34 -0700 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2019-04-20 19:34:03 +0000 |
| commit | 68d4b1265ec7915dccfccf6c0e32f9ab2d9c3a86 (patch) | |
| tree | ec4088bbe86f6c81e917f2db3a03e4784e14dd35 /src/encoding/json | |
| parent | d23cba683e59f6092c1e3f676c8e83e7973f27dd (diff) | |
| download | go-68d4b1265ec7915dccfccf6c0e32f9ab2d9c3a86.tar.xz | |
cmd/compile: reduce bits.Div64(0, lo, y) to 64 bit division
With this change, these two functions generate identical code:
func f(x uint64) (uint64, uint64) {
return bits.Div64(0, x, 5)
}
func g(x uint64) (uint64, uint64) {
return x / 5, x % 5
}
Updates #31582
Change-Id: Ia96c2e67f8af5dd985823afee5f155608c04a4b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/173197
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/encoding/json')
0 files changed, 0 insertions, 0 deletions
