]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix load-combining rules
authorKeith Randall <khr@golang.org>
Mon, 13 Feb 2017 17:37:06 +0000 (09:37 -0800)
committerKeith Randall <khr@golang.org>
Mon, 13 Feb 2017 18:29:51 +0000 (18:29 +0000)
commitb548eee3d96fc0b6e962a243b28121e1f37ad792
tree8e960a95d546c5d069969ef6494916dcd2f51ac5
parent76b4b8c72dc319454ff3ecb83bf49831e4e528c3
cmd/compile: fix load-combining rules

CL 33632 reorders args of commutative ops in order to make
CSE for commutative ops more robust.  Unfortunately, that
broke the load-combining rules which depend on a certain ordering
of OR ops' arguments.

Introduce some additional rules that order OR ops' arguments
consistently so that the load-combining rules fire.

Note: there's also something else wrong with the s390x rules.
I've filed #19059 for that.

Fixes #18946

Change-Id: I0a5447196bd88a55ccee683c69a57b943a9972e1
Reviewed-on: https://go-review.googlesource.com/36911
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/gc/asm_test.go
src/cmd/compile/internal/ssa/gen/386.rules
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/S390X.rules
src/cmd/compile/internal/ssa/rewrite386.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/cmd/compile/internal/ssa/rewriteS390X.go