From 0156b797e6f0d1a116a19cd852f569ec2c2eec11 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Thu, 27 Oct 2022 08:28:06 -0700 Subject: cmd/compile: recognize when the result of append has a constant length Fixes a performance regression due to CL 418554. Fixes #56440 Change-Id: I6ff152e9b83084756363f49ee6b0844a7a284880 Reviewed-on: https://go-review.googlesource.com/c/go/+/445875 Run-TryBot: Keith Randall Reviewed-by: Keith Randall TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui --- test/prove.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/prove.go') diff --git a/test/prove.go b/test/prove.go index 1be257f206..7792b432f9 100644 --- a/test/prove.go +++ b/test/prove.go @@ -500,7 +500,7 @@ func f19() (e int64, err error) { last := len(stack) - 1 e = stack[last] // Buggy compiler prints "Disproved Leq64" for the next line. - stack = stack[:last] // ERROR "Proved IsSliceInBounds" + stack = stack[:last] return e, nil } -- cgit v1.2.1