]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: remove BTQconst rule
authorGiovanni Bajo <rasky@develer.com>
Sat, 10 Mar 2018 10:17:05 +0000 (11:17 +0100)
committerGiovanni Bajo <rasky@develer.com>
Tue, 13 Mar 2018 23:21:38 +0000 (23:21 +0000)
commiteb44b8635cc774d0f2b2f96637116a5b41943bc5
treeb0291c16f80a27d456546bfb1239419b30c3fdbd
parente601c079082658399445c2698f7e5cb60d23db29
cmd/compile: remove BTQconst rule

This rule is meant for code optimization, but it makes other rules
potentially more complex, as they need to cope with the fact that
a 32-bit op (BTLconst) can appear everywhere a 64-bit rule maches.

Move the optimization to opcode expansion instead. Tests will be
added in following CL.

Change-Id: Ica5ef291e7963c4af17c124d4a2869e6c8f7b0c7
Reviewed-on: https://go-review.googlesource.com/99995
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/amd64/ssa.go
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go