Debian Codegraph @

test/tighten.go

raw
1 // errorcheck -0 -d=ssa/tighten/debug=1
2
3 //go:build arm64
4
5 // Copyright 2023 The Go Authors. All rights reserved.
6 // Use of this source code is governed by a BSD-style
7 // license that can be found in the LICENSE file.
8
9 package main
10
11 var (
12 ga, gb, gc, gd int
13 )
14
15 func moveValuesWithMemoryArg(len int) {
16 for n := 0; n < len; n++ {
17 // Loads of b and d can be delayed until inside the outer "if".
18 a := ga
19 b := gb // ERROR "MOVDload is moved$"
20 c := gc
21 d := gd // ERROR "MOVDload is moved$"
22 if a == c {
23 if b == d {
24 return
25 }
26 }
27 }
28 }