]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: memcombine if values being stored are from consecutive loads
authorKeith Randall <khr@golang.org>
Sat, 10 Jun 2023 15:26:34 +0000 (08:26 -0700)
committerDavid Chase <drchase@google.com>
Fri, 21 Jul 2023 19:06:53 +0000 (19:06 +0000)
commite713d6f939c90eb599c1469d08bb5edd7de8a281
tree9276e7eb337a4fe2d5a66311eaf0658527b819d2
parentffd9bd7e605cdd2eb66e38bad6e0d93b0d37963c
cmd/compile: memcombine if values being stored are from consecutive loads

If we load 2 values and then store those 2 loaded values, we can likely
perform that operation with a single wider load and store.

Fixes #60709

Change-Id: Ifc5f92c2f1b174c6ed82a69070f16cec6853c770
Reviewed-on: https://go-review.googlesource.com/c/go/+/502295
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/_gen/AMD64.rules
src/cmd/compile/internal/ssa/memcombine.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
test/codegen/memcombine.go