Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/compile: fix missing init nodes for len(string([]byte)) optimization
CL 497276 added optimization for len(string([]byte)) by avoiding call to slicebytetostring. However, the bytes to string expression may contain init nodes, which need to be preserved. Otherwise, it would make the liveness analysis confusing about the lifetime of temporary variables created by init nodes. Fixes golang#61778 Change-Id: I6d1280a7d61bcc75f11132af41bda086f084ab54 Reviewed-on: https://go-review.googlesource.com/c/go/+/516375 Run-TryBot: Cuong Manh Le <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Cuong Manh Le <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
- Loading branch information