mirror of
https://github.com/golang/go
synced 2024-11-21 21:44:40 -07:00
cmd/compile: add shift optimization test
For #69635 Change-Id: Id5696dc9724c3b3afcd7b60a6994f98c5309eb0e Reviewed-on: https://go-review.googlesource.com/c/go/+/621755 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
dd4fee7ec6
commit
bb07aa644b
13
test/codegen/issue69635.go
Normal file
13
test/codegen/issue69635.go
Normal file
@ -0,0 +1,13 @@
|
||||
// asmcheck
|
||||
|
||||
// Copyright 2024 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 calc(a uint64) uint64 {
|
||||
v := a >> 20 & 0x7f
|
||||
// amd64: `SHRQ\s\$17, AX$`, `ANDL\s\$1016, AX$`
|
||||
return v << 3
|
||||
}
|
Loading…
Reference in New Issue
Block a user