]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix Zero-to-Load forwarding rules
authorMichael Munday <mike.munday@ibm.com>
Tue, 8 May 2018 15:30:48 +0000 (16:30 +0100)
committerMichael Munday <mike.munday@ibm.com>
Tue, 8 May 2018 16:20:51 +0000 (16:20 +0000)
commitfbfbf03b2811eb3611e4677da6cdb7c099922e6e
tree59594c657d580c1a8640388acb047b80aa39e691
parent8af0c77df34a85ada2fe7f508ffaa0e337dddccb
cmd/compile: fix Zero-to-Load forwarding rules

Avoid using values that do not dominate the block the Zero op is in.
Should fix the SSA check builder.

The additional OffPtr ops inserted by these rules should always be
optimized away when the Load is replaced with a const zero.

Fixes #25288.

Change-Id: I4163b58e60364f77c8a206ba084073a58ca6320a
Reviewed-on: https://go-review.googlesource.com/112136
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go