]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: Fix constant-folding of unsigned shifts
authorKeith Randall <khr@golang.org>
Thu, 7 Apr 2016 17:21:35 +0000 (10:21 -0700)
committerKeith Randall <khr@golang.org>
Thu, 7 Apr 2016 21:39:32 +0000 (21:39 +0000)
commit68ac1f774624faf99e7f6ec6592acb50f23b7874
tree09f13f6e4fbefc37ba69a49a85547c33d51b7ae3
parentdfded57819dd9111afffc25360cd3e147859d354
cmd/compile: Fix constant-folding of unsigned shifts

Make sure the results of unsigned constant-folded
shifts are sign-extended into the AuxInt field.

Fixes #15175

Change-Id: I3490d1bc3d9b2e1578ed30964645508577894f58
Reviewed-on: https://go-review.googlesource.com/21586
Reviewed-by: Alexandru Moșoi <alexandru@mosoi.ro>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go
test/fixedbugs/issue15175.go [new file with mode: 0644]