]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: unwrap fewer CONVNOPs in staticassign
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 15 Sep 2016 03:07:13 +0000 (20:07 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Thu, 15 Sep 2016 14:08:10 +0000 (14:08 +0000)
commitdf2b63f09be280544e58c8d17fe34c863521ed10
tree130826de3b965afd37232a54c4a08d6df7bf79a0
parentd7012ca282092e876c3f12b758e12d6eabc8cc3c
cmd/compile: unwrap fewer CONVNOPs in staticassign

staticassign unwraps all CONVNOPs.
However, in the included test, we need the
CONVNOP for everything to typecheck.
Stop unwrapping unnecessarily.

The code we generate for this example is
suboptimal, but that's not new; see #17113.

Fixes #17111.

Change-Id: I29532787a074a6fe19a5cc53271eb9c84bf1b576
Reviewed-on: https://go-review.googlesource.com/29213
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/sinit.go
test/fixedbugs/issue17111.go [new file with mode: 0644]