]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add missing StringLen rule in prove
authorKeith Randall <khr@golang.org>
Sun, 22 Jun 2025 23:50:16 +0000 (16:50 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 24 Jul 2025 23:06:14 +0000 (16:06 -0700)
commitf703dc5befdad9390decc251e8b1f5e0f061c088
treef7d3cc9fc8e2de66f1b1e2d48ea1067611f0933e
parent394d0bee8d1ad62ba88d4a3b2d93427d6a8ceb33
cmd/compile: add missing StringLen rule in prove

(StringLen (StringMake _ x)) == x, just like the rules we
currently have for slices.

This helps propagate string length knowledge to places which need it.

Change-Id: Ifdcf6d1f2d430c1c4bbac32e0ea74c188eae998e
Reviewed-on: https://go-review.googlesource.com/c/go/+/682777
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
src/cmd/compile/internal/ssa/prove.go
test/prove.go