]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: strength reduce *24
authorKeith Randall <khr@golang.org>
Sat, 12 Mar 2016 01:39:00 +0000 (17:39 -0800)
committerKeith Randall <khr@golang.org>
Sat, 12 Mar 2016 02:58:45 +0000 (02:58 +0000)
commit77b527e283112d33000990c59e766074c9396292
tree7507e11b481c7c3f008155227bf715440568f19b
parent68c86a00967fb83c4c8fca74498432967c91f778
cmd/compile: strength reduce *24

We use *24 a lot for pointer arithmetic when accessing slices
of slices ([][]T).  Rewrite to use an LEA and a shift.
The shift will likely be free, as it often gets folded into
an indexed load/store.

Update #14606

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