]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't treat an InlMark as a read during deadstore
authorKeith Randall <khr@golang.org>
Thu, 13 Jun 2024 03:24:44 +0000 (20:24 -0700)
committerKeith Randall <khr@google.com>
Tue, 23 Jul 2024 20:55:24 +0000 (20:55 +0000)
commitb0f7be3cfa1ee5fbfe46590475861677cc9514fa
tree6b5d26c101d51df9e9ae504cd36f26b29355d5e6
parentf66db499769002f1f804f52234b7c3e5917bbad6
cmd/compile: don't treat an InlMark as a read during deadstore

An InlMark "read" can't make an otherwise dead store live. Without this
CL, we sometimes zero an object twice in succession because we think
there is a reader in between.

Kind of challenging to make a test for this. The second zeroing has the
same instruction on the same line number, so codegen tests can't see it.

Fixes #67957

Change-Id: I7fb97ebff50d8eb6246fc4802d1136b7cc76c45f
Reviewed-on: https://go-review.googlesource.com/c/go/+/592615
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/ssa/deadstore.go
src/runtime/symtabinl_test.go