]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: slightly optimize adding 128
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 19 Mar 2019 19:26:22 +0000 (12:26 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 19 Mar 2019 19:44:52 +0000 (19:44 +0000)
commit250b96a7bfa5b9ac0f31e70e768173f57a61d2f7
tree105be22ff285df0d1f5b40819b69a1b3844d3285
parentfc1e6915dc04aeb95c2f736f8c8805ba6a696c30
cmd/compile: slightly optimize adding 128

'SUBQ $-0x80, r' is shorter to encode than 'ADDQ $0x80, r',
and functionally equivalent. Use it instead.

Shaves off a few bytes here and there:

file    before    after     Δ       %
compile 25935856  25927664  -8192   -0.032%
nm      4251840   4247744   -4096   -0.096%

Change-Id: Ia9e02ea38cbded6a52a613b92e3a914f878d931e
Reviewed-on: https://go-review.googlesource.com/c/go/+/168344
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/amd64/ssa.go
test/codegen/arithmetic.go