1
0
mirror of https://github.com/golang/go synced 2024-11-25 12:37:56 -07:00
go/test/codegen/issue59297.go
Keith Randall 36b45bca66 cmd/compile: regalloc: drop values that aren't used until after a call
No point in keeping values in registers when their next use is after
a call, as we'd have to spill/restore them anyway.

cmd/go is 0.1% smaller.

Fixes #59297

Change-Id: I10ee761d0d23229f57de278f734c44d6a8dccd6c
Reviewed-on: https://go-review.googlesource.com/c/go/+/509255
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-08-26 22:29:43 +00:00

18 lines
297 B
Go

// asmcheck
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package codegen
func f(x, y int, p *int) {
// amd64:`MOVQ\sAX, BX`
h(8, x)
*p = y
}
//go:noinline
func h(a, b int) {
}