diff options
| author | Jorropo <jorropo.pgm@gmail.com> | 2024-08-09 15:45:39 +0200 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2024-09-03 17:12:49 +0000 |
| commit | 49621cc311a41b71f60f03202f3872c0633cac59 (patch) | |
| tree | 56612663952081bbad6db8ebd4e1ebbecbb88d93 /src/cmd/objdump | |
| parent | 9a4fe7e14a4f71267f929c5545916f9830a89187 (diff) | |
| download | go-49621cc311a41b71f60f03202f3872c0633cac59.tar.xz | |
cmd/compile: compute XOR's limits from argument's limits
This help to optimize code like this:
func f(buckets *[512]bucket, v value) {
a, b := v.computeSomething()
// assume a and b are proved < 512
b := &buckets[a ^ b] // pick a random bucket
b.store(v)
}
Change-Id: I1acf702f5a8137f9ded49081b4703922879b0288
Reviewed-on: https://go-review.googlesource.com/c/go/+/604455
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/objdump')
0 files changed, 0 insertions, 0 deletions
