]> Cypherpunks repositories - gostls13.git/commit
cmp/compile: rewrite CMP $0 with TEST
authorPhilip Hofer <phofer@umich.edu>
Tue, 29 Mar 2016 18:29:28 +0000 (11:29 -0700)
committerKeith Randall <khr@golang.org>
Wed, 30 Mar 2016 00:50:53 +0000 (00:50 +0000)
commitc12a0e645a9e5e69bb549d69811c54351f562eae
tree37dc4578d8a916b6a4bc94ea0a33f84cb1902f1b
parentaec8e14589edecfd9752255e742b88e15ee651f2
cmp/compile: rewrite CMP $0 with TEST

The CMP* family of instructions are longer than their TEST counterparts by one byte.

After this change, my go tool has 13 cmp.*$0x0 instructions, compared to 5612 before.

Change-Id: Ieb87d65657917e494c0e4b711a7ba2918ae27610
Reviewed-on: https://go-review.googlesource.com/21255
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go