]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: match Aux and AuxInt explicitly in store combining rule
authorCherry Zhang <cherryyz@google.com>
Fri, 5 Mar 2021 20:12:37 +0000 (15:12 -0500)
committerCherry Zhang <cherryyz@google.com>
Fri, 5 Mar 2021 22:14:48 +0000 (22:14 +0000)
commita829114b21b5a4238dea13dc97b030d650935ed8
tree27e2ef811e686a35160977a0e3abba7a9b8217f3
parentd85083911d6ea742901933a544467dad55bb381f
cmd/compile: match Aux and AuxInt explicitly in store combining rule

CL 280456 introduced a new store combining rule. On the LHS some
of the Aux and AuxInt of the stores are not specified, therefore
ignored during the matching. The rule is only correct if they
match. This CL adds explict match.

TODO: maybe we want the rule matcher require Aux/AuxInt to be
always specified on the LHS (using _ to explicitly ignore)? Or
maybe we want it to match the zero value if not specified? The
current approach is error-prone.

Fixes #44823.

Change-Id: Ic12b4a0de63117f2f070039737f0c905f28561bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/299289
Trust: Cherry Zhang <cherryyz@google.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
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/issue44823.go [new file with mode: 0644]