]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.15] cmd/compile: fix left shift constant folding rule
authorKeith Randall <khr@golang.org>
Thu, 1 Oct 2020 16:57:52 +0000 (09:57 -0700)
committerAlexander Rakoczy <alex@golang.org>
Wed, 14 Oct 2020 15:13:22 +0000 (15:13 +0000)
commit7863f742c4e8427a7169325b024c2d8a970e0134
tree0e19add8adfcdaf24d51345bf4d4c76b17186494
parent8b224e9951438283ae53ae35dc2a50a56fccc404
[release-branch.go1.15] cmd/compile: fix left shift constant folding rule

The 32-bit left shift constant folding rule should keep its result
properly sign extended.

Fixes #41720
Fixes #41711

Change-Id: I0fc74444d444274e911952e1725dab0b7737a846
Reviewed-on: https://go-review.googlesource.com/c/go/+/258817
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go
test/fixedbugs/issue41711.go [new file with mode: 0644]