]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: simplify load+op rules
authorKeith Randall <khr@golang.org>
Tue, 28 Feb 2017 22:01:59 +0000 (14:01 -0800)
committerKeith Randall <khr@golang.org>
Tue, 28 Feb 2017 22:16:23 +0000 (22:16 +0000)
commit0fe58bf6500a615e934e1ab2a7921dfbc2803cea
tree78a091d931b74171739fe9d27264bda640af6f72
parent45055f21ab4b6005446e8d680f315ece410e75b5
cmd/compile: simplify load+op rules

There's no need to use @block rules, as canMergeLoad makes sure that
the load and op are already in the same block.
With no @block needed, we also don't need to set the type explicitly.
It can just be inherited from the op being rewritten.

Noticed while working on #19284.

Change-Id: Ied8bcc8058260118ff7e166093112e29107bcb7e
Reviewed-on: https://go-review.googlesource.com/37585
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/rewriteAMD64.go