2023-05-05 01:07:25 +00:00
|
|
|
// errorcheck -0 -d=ssa/tighten/debug=1
|
|
|
|
|
|
|
|
//go:build arm64
|
|
|
|
|
|
|
|
// 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 main
|
|
|
|
|
|
|
|
var (
|
2024-11-17 12:07:34 -08:00
|
|
|
ga, gb, gc, gd int
|
2023-05-05 01:07:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func moveValuesWithMemoryArg(len int) {
|
|
|
|
for n := 0; n < len; n++ {
|
2024-11-17 12:07:34 -08:00
|
|
|
// Loads of b and d can be delayed until inside the outer "if".
|
|
|
|
a := ga
|
|
|
|
b := gb // ERROR "MOVDload is moved$"
|
|
|
|
c := gc
|
|
|
|
d := gd // ERROR "MOVDload is moved$"
|
|
|
|
if a == c {
|
|
|
|
if b == d {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2023-05-05 01:07:25 +00:00
|
|
|
}
|
|
|
|
}
|