]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: compare size in dead store elimination
authorCherry Zhang <cherryyz@google.com>
Thu, 18 Aug 2016 01:23:36 +0000 (21:23 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 18 Aug 2016 16:38:56 +0000 (16:38 +0000)
commita7277e5494c696a4798b99e1e55d55acf61211de
tree1c701a099bcc800e67e0061f767654b3018c4e77
parent5b9ff11c3d50368c44ae7aa9cb4b58c67494e7bb
cmd/compile: compare size in dead store elimination

Only remove stores that is shadowed by another store with same or
larger size. Normally we don't need this check because we did check
the types, but unsafe pointer casting can get around it.

Fixes #16769.

Change-Id: I3f7c6c57807b590a2f735007dec6c65a4fa01a34
Reviewed-on: https://go-review.googlesource.com/27320
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/deadstore.go
src/cmd/compile/internal/ssa/deadstore_test.go