]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] cmd/compile: add necessary operand to mergePoint in rewrite...
authorDavid Chase <drchase@google.com>
Wed, 19 Jun 2019 22:09:39 +0000 (18:09 -0400)
committerAlexander Rakoczy <alex@golang.org>
Mon, 8 Jul 2019 17:49:50 +0000 (17:49 +0000)
commit4dbe72de5fc7e32f829a97135b2d7a8f7984f33a
tree5715631bbb4cf09e33da341e45a483f78a587b7a
parentc955c54431f18f407294f86b12b5b39a82ee9ee0
[release-branch.go1.12] cmd/compile: add necessary operand to mergePoint in rewrite rules

A missing operand to mergePoint caused lower to place values
in the wrong blocks.

Includes test, belt+suspenders to do both ssa check and verify
the output (was is how the bug was originally observed).

The fixed bug here is very likely present in Go versions
1.9-1.12 on amd64 and s390x

Updates #32680.
Fixes #32712.

Change-Id: I63e702c4c40602cb795ef71b1691eb704d38ccc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/183059
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 769fda2d5110eef6146d7df3bf0219872c9b0da6)
Reviewed-on: https://go-review.googlesource.com/c/go/+/183241
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/S390X.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/cmd/compile/internal/ssa/rewriteS390X.go
test/fixedbugs/issue32680.go [new file with mode: 0644]
test/fixedbugs/issue32680.out [new file with mode: 0644]