]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: strength reduce more x86 constant multiplication
authorJosh Bleecher Snyder <josharian@gmail.com>
Sat, 24 Mar 2018 02:09:23 +0000 (19:09 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 28 Mar 2018 18:33:10 +0000 (18:33 +0000)
commit6a74fe2f15650572adfd1b49dec760052295b21f
tree3a93a741dba9a331ec39b8a47efe3a6ad8f203e2
parent7bf631e1fc55839a6bff404a91597326e1addc10
cmd/compile: strength reduce more x86 constant multiplication

The additions were machine-generated.

The change for x * 7 avoids a reg-reg move,
reducing the number of instructions from 3 to 2.

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