go source for verification 2026-05-22

This commit is contained in:
2026-05-22 16:44:48 +08:00
commit 3ae432d492
14992 changed files with 3674967 additions and 0 deletions

42
test/simd_inline.go Normal file
View File

@@ -0,0 +1,42 @@
// errorcheck -0 -m
//go:build goexperiment.simd && amd64
// 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 foo
import "simd/archsimd"
func hasClosure(a, b, c, d archsimd.Int64x4) (w, x, y, z archsimd.Int64x4) {
shuf := func() { // ERROR "can inline hasClosure.func1"
w = z.RotateAllLeft(1).Xor(a)
x = w.RotateAllLeft(3).Xor(b)
y = x.RotateAllLeft(5).Xor(c)
z = y.RotateAllLeft(7).Xor(d)
a, b, c, d = b.RotateAllLeft(1).Xor(a.RotateAllLeft(23)), c.RotateAllLeft(1).Xor(b.RotateAllLeft(23)), d.RotateAllLeft(1).Xor(c.RotateAllLeft(23)), a.RotateAllLeft(1).Xor(d.RotateAllLeft(23))
w = z.RotateAllLeft(1).Xor(a)
x = w.RotateAllLeft(3).Xor(b)
y = x.RotateAllLeft(5).Xor(c)
z = y.RotateAllLeft(7).Xor(d)
a, b, c, d = b.RotateAllLeft(1).Xor(a.RotateAllLeft(23)), c.RotateAllLeft(1).Xor(b.RotateAllLeft(23)), d.RotateAllLeft(1).Xor(c.RotateAllLeft(23)), a.RotateAllLeft(1).Xor(d.RotateAllLeft(23))
w = z.RotateAllLeft(1).Xor(a)
x = w.RotateAllLeft(3).Xor(b)
y = x.RotateAllLeft(5).Xor(c)
z = y.RotateAllLeft(7).Xor(d)
a, b, c, d = b.RotateAllLeft(1).Xor(a.RotateAllLeft(23)), c.RotateAllLeft(1).Xor(b.RotateAllLeft(23)), d.RotateAllLeft(1).Xor(c.RotateAllLeft(23)), a.RotateAllLeft(1).Xor(d.RotateAllLeft(23))
}
shuf() // ERROR "inlining call to hasClosure.func1"
shuf() // ERROR "inlining call to hasClosure.func1"
shuf() // ERROR "inlining call to hasClosure.func1"
shuf() // ERROR "inlining call to hasClosure.func1"
shuf() // ERROR "inlining call to hasClosure.func1"
shuf() // ERROR "inlining call to hasClosure.func1"
shuf() // ERROR "inlining call to hasClosure.func1"
shuf() // ERROR "inlining call to hasClosure.func1"
shuf() // ERROR "inlining call to hasClosure.func1"
return
}