]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: lots of small rewrite optimizations
authorKeith Randall <khr@golang.org>
Sat, 30 Jan 2016 19:25:38 +0000 (11:25 -0800)
committerKeith Randall <khr@golang.org>
Sun, 31 Jan 2016 05:30:13 +0000 (05:30 +0000)
commit1cc5789df9eb8c88e0d7248a9a16b3d4ca854962
tree4a8e8e88ebede8a417a42e008a9488e524c5c4de
parentf962f33035bccd67c08fa3e0002659d6b9978bbc
[dev.ssa] cmd/compile: lots of small rewrite optimizations

Small optimizations I noticed while looking at Giovanni's test cases.

More shifts by constants.
Indexed stores for smaller types.
Fold LEA into loads/stores.
More extending loads.
CMP $0 of AND -> TEST

Fix order of TEST ops.

Giovanni's test cases at https://gist.github.com/rasky/62fba94e3a20d1b05b2a

Change-Id: I7077bc0b5319bf05767eeb39f401f4bb4b39f635
Reviewed-on: https://go-review.googlesource.com/19086
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Todd Neal <todd@tneal.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/TODO
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteAMD64.go