aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2025-08-20 12:29:02 -0400
committerDavid Chase <drchase@google.com>2025-08-20 15:13:04 -0700
commit7c84e984e675e44a2abc9aa25dd68cb9c9d08ec5 (patch)
tree91970f18429a0466f473e0282d552c3df6f58064 /test
parentcf31b1563534d6c4f8d2be87cbfdebd6e61ad479 (diff)
downloadgo-7c84e984e675e44a2abc9aa25dd68cb9c9d08ec5.tar.xz
[dev.simd] cmd/compile: rewrite to elide Slicemask from len==c>0 slicing
This might have been something that prove could be educated into figuring out, but this also works, and it also helps prove downstream. Adjusted the prove test, because this change moved a message. Change-Id: I5eabe639eff5db9cd9766a6a8666fdb4973829cb Reviewed-on: https://go-review.googlesource.com/c/go/+/697715 Commit-Queue: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Bypass: David Chase <drchase@google.com>
Diffstat (limited to 'test')
-rw-r--r--test/prove.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/prove.go b/test/prove.go
index 70a27865cf..6d2bb0962b 100644
--- a/test/prove.go
+++ b/test/prove.go
@@ -511,10 +511,10 @@ func f19() (e int64, err error) {
func sm1(b []int, x int) {
// Test constant argument to slicemask.
- useSlice(b[2:8]) // ERROR "Proved slicemask not needed$"
+ useSlice(b[2:8]) // optimized away earlier by rewrite
// Test non-constant argument with known limits.
if cap(b) > 10 {
- useSlice(b[2:])
+ useSlice(b[2:]) // ERROR "Proved slicemask not needed$"
}
}