]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fold address calculations into CMPload[const] ops
authorKeith Randall <khr@golang.org>
Fri, 14 Sep 2018 17:57:57 +0000 (10:57 -0700)
committerKeith Randall <khr@golang.org>
Fri, 14 Sep 2018 19:42:09 +0000 (19:42 +0000)
commitb1f656b1ceb09124f2d8ad63ceceb8df20a581c2
tree4c31a6cfc9f08487780c9d3481785e9910bf95d0
parenta708353a0c2c39ce4e8182ea75e5082135ae674f
cmd/compile: fold address calculations into CMPload[const] ops

Makes go binary smaller by 0.2%.

I noticed this in autogenerated equal methods, and there are
probably a lot of those.

Change-Id: I4e04eb3653fbceb9dd6a4eee97ceab1fa4d10b72
Reviewed-on: https://go-review.googlesource.com/135379
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go
test/codegen/memops.go [new file with mode: 0644]