diff options
| author | David Chase <drchase@google.com> | 2017-05-30 16:06:59 -0400 |
|---|---|---|
| committer | David Chase <drchase@google.com> | 2017-05-30 21:30:18 +0000 |
| commit | 9613a638a95d5388f1f50189531a4e19af08fb15 (patch) | |
| tree | 038aea65ebcbe68b7602dcd646f827e377ee538d /src/syscall/exec_linux.go | |
| parent | d10549fb5763d33667ab02c0713c22c14f90078c (diff) | |
| download | go-9613a638a95d5388f1f50189531a4e19af08fb15.tar.xz | |
cmd/compile: fix subword store/load elision for amd64, x86, arm
Replacing byteload-of-bytestore-of-x with x is incorrect
when x contains a larger-than-byte value (and so on for
16 and 32-bit load/store pairs). Replace "x" with the
appropriate zero/sign extension of x, which if unnecessary
will be repaired by other rules.
Made logic for arm match x86 and amd64; yields minor extra
optimization, plus I am (much) more confident it's correct,
despite inability to reproduce bug on arm.
Ppc64 lacks this optimization, hence lacks this problem.
See related https://golang.org/cl/37154/
Fixes #20530.
Change-Id: I6af9cac2ad43bee99cafdcb04725ce7e55a43323
Reviewed-on: https://go-review.googlesource.com/44355
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/syscall/exec_linux.go')
0 files changed, 0 insertions, 0 deletions
