]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix cmpstring rewrite rule
authorKeith Randall <khr@golang.org>
Mon, 22 Apr 2024 17:04:03 +0000 (10:04 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 22 Apr 2024 18:24:47 +0000 (18:24 +0000)
commit9f9dd2bfd8a09083b21767d13df38ff67d7236d8
tree280fc98560210b586c1b36c9ac80767733bb5dde
parent79065f0a5eb48534142ed01d569e742b60a13f34
cmd/compile: fix cmpstring rewrite rule

We need to ensure that the Select0 lives in the same block as
its argument. Divide up the rule into 2 so that we can put the
parts in the right places.

(This would be simpler if we could use @block syntax mid-rule, but
that feature currently only works at the top level.)

This fixes the ssacheck builder after CL 578835

Change-Id: Id26a01d9fac0684e0b732d35d0f7999f6de07825
Reviewed-on: https://go-review.googlesource.com/c/go/+/580815
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@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/_gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go