]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.9] cmd/compile: fix decomposition of 1-element arrays
authorKeith Randall <khr@golang.org>
Mon, 13 Nov 2017 18:48:52 +0000 (10:48 -0800)
committerAndrew Bonventre <andybons@golang.org>
Mon, 22 Jan 2018 20:25:08 +0000 (20:25 +0000)
commit2308c9c95eb2bb87ed3979961d3433e8428f8912
treee2f5fac7adcd98b1c5d00807c4c7014bd48f28e9
parentf8a22093e2f636af07a738c17ce6022c5224719d
[release-branch.go1.9] cmd/compile: fix decomposition of 1-element arrays

The offending rule could move the load to a different block,
which is always a bad idea.

Fixes #22683

Change-Id: I973c88389b2359f734924d9f45c3fb38e166691d
Reviewed-on: https://go-review.googlesource.com/77331
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go
test/fixedbugs/issue22683.go [new file with mode: 0644]
test/fixedbugs/issue22683.out [new file with mode: 0644]