]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: prefer non-indexed stores on amd64
authorIlya Tocar <ilya.tocar@intel.com>
Fri, 6 Apr 2018 21:47:48 +0000 (16:47 -0500)
committerIlya Tocar <ilya.tocar@intel.com>
Fri, 13 Apr 2018 21:43:12 +0000 (21:43 +0000)
commit983fca55c0c43ef8cc663e3c0770d62032eac495
tree43bb002ce6f087ce326a8a6540ed1a0a384a0a6a
parente53cc7ae931eeec0863d066d98972fc52fcd09f0
cmd/compile/internal/ssa: prefer non-indexed stores on amd64

We sometimes generate code like this:

v473 = MOVQconst <uintptr> // constant..
v580 = MOVBstoreidx1 <mem> v1056 v473 v819 v491 // ..only used as an index

Rewrite indexed stores to non-indexed version, where possible.
This allows to eliminate  const->register move, reducing codesize and lowering register pressure.

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