aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/schedule.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/codegen/schedule.go b/test/codegen/schedule.go
new file mode 100644
index 0000000000..aafffd817b
--- /dev/null
+++ b/test/codegen/schedule.go
@@ -0,0 +1,17 @@
+// asmcheck
+
+// Copyright 2025 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(n int) int {
+ r := 0
+ // arm64:-"MOVD\t R"
+ // amd64:-"LEAQ","INCQ"
+ for i := range n {
+ r += i
+ }
+ return r
+}