]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove superfluous SetBounded call
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 17 Apr 2020 05:05:35 +0000 (22:05 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 17 Apr 2020 15:33:31 +0000 (15:33 +0000)
The call does nothing when applied to an OLSH node.
It would be unnecessary anyway, since we're shifting by a small constant.

Passes toolstash-check.

Change-Id: If858711f1704f44637fa0f6a4c66cbaad6db24b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/228699
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/gc/walk.go

index bf12455a5d4ef5196f87544e65d50a01ead76e9d..06910450ff772fe6934ad4869982313a6096c725 100644 (file)
@@ -840,7 +840,6 @@ opswitch:
                        n.Left = cheapexpr(n.Left, init)
                        // byteindex widens n.Left so that the multiplication doesn't overflow.
                        index := nod(OLSH, byteindex(n.Left), nodintconst(3))
-                       index.SetBounded(true)
                        if thearch.LinkArch.ByteOrder == binary.BigEndian {
                                index = nod(OADD, index, nodintconst(7))
                        }