]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: recognize when the result of append has a constant length
authorKeith Randall <khr@golang.org>
Thu, 27 Oct 2022 15:28:06 +0000 (08:28 -0700)
committerKeith Randall <khr@google.com>
Thu, 27 Oct 2022 17:09:50 +0000 (17:09 +0000)
commit0156b797e6f0d1a116a19cd852f569ec2c2eec11
tree045ca4dc0202cb6844ff25f5096c432e9f30fea7
parentda0913f814dd4dcd28698dc5b85a3347b77b5550
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 <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/compile/internal/ssa/_gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go
test/codegen/issue56440.go [new file with mode: 0644]
test/prove.go