Files
go-legacy-win7/test/tighten.go

29 lines
550 B
Go
Raw Normal View History

2024-09-21 23:49:08 +10: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 (
2025-08-13 21:50:03 +07:00
ga, gb, gc, gd int
2024-09-21 23:49:08 +10:00
)
func moveValuesWithMemoryArg(len int) {
for n := 0; n < len; n++ {
2025-08-13 21:50:03 +07: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
}
}
2024-09-21 23:49:08 +10:00
}
}