]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: remove x86 arch-specific rules for +2ⁿ multiplication
authorAlberto Donizetti <alb.donizetti@gmail.com>
Thu, 5 Oct 2017 14:05:03 +0000 (16:05 +0200)
committerAlberto Donizetti <alb.donizetti@gmail.com>
Fri, 6 Oct 2017 09:30:57 +0000 (09:30 +0000)
commit03614562ca5a16102be948c1b6808f5bc423de66
treeea56f2a9916287a9387c3f1b5158cbce7a7c3944
parent07e36af7d6a34d2d70fa794dda44ad2b087c21e1
cmd/compile: remove x86 arch-specific rules for +2ⁿ multiplication

amd64 and 386 have rules to reduce multiplication by a positive power
of two, but a more general reduction (both for positive and negative
powers of two) is already performed by generic rules that were added
in CL 36323 to replace walkmul (see lines 166:173 in generic.rules).

The x86 and amd64 rules are never triggered during all.bash and can be
removed, reducing rules duplication.

The change also adds a few code generation tests for amd64 and 386.

Change-Id: I566d48186643bd722a4c0137fe94e513b8b20e36
Reviewed-on: https://go-review.googlesource.com/68450
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
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/rewrite386.go
src/cmd/compile/internal/ssa/rewriteAMD64.go