]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: place combined loads at the location of the last byte load
authorKeith Randall <khr@golang.org>
Tue, 29 Mar 2016 04:45:33 +0000 (21:45 -0700)
committerKeith Randall <khr@golang.org>
Thu, 31 Mar 2016 17:21:33 +0000 (17:21 +0000)
commitb81f2f106f68b771518f40390a69f834717f17d1
tree40b9715dc18d5bbcdbb52a5ce4b90c3e8c5508ed
parentb83618f964fe496929fe2ce48a262dbed7e680b1
cmd/compile: place combined loads at the location of the last byte load

We need to make sure all the bounds checks pass before issuing
a load which combines several others.  We do this by issuing the
combined load at the last load's block, where "last" = closest to
the leaf of the dominator tree.

Fixes #15002

Change-Id: I7358116db1e039a072c12c0a73d861f3815d72af
Reviewed-on: https://go-review.googlesource.com/21246
Reviewed-by: Todd Neal <todd@tneal.org>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
test/fixedbugs/issue15002.go [new file with mode: 0644]