]> git.feebdaed.xyz Git - 0xmirror/go.git/commit
cmd/compile: add cases for StringLen to prove
authorDavid Chase <drchase@google.com>
Mon, 24 Nov 2025 20:00:11 +0000 (15:00 -0500)
committerDavid Chase <drchase@google.com>
Mon, 24 Nov 2025 23:49:12 +0000 (15:49 -0800)
commit62cd044a79b9f2ba889bca59b3b12400dc41dd85
treea120624e15b2a31014cc6e215a48cefbecf3fe99
parentf1e376f342af82d6f5bdba23cdc5c35b5bfd9064
cmd/compile: add cases for StringLen to prove

Tricky index-offset logic had been added for slices,
but not for strings.  This fixes that, and also adds
tests for same behavior in string/slice cases, and adds
a new test for code in prove that had been added but not
explicitly tested.

Fixes #76270.

Change-Id: Ibd92b89e944d86b7f30b4486a9008e6f1ac6af7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/723980
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/prove.go
test/loopbce.go
test/prove.go