From a5fe8c07ae7ae96049f692c43008ad2f770924c7 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Tue, 23 Dec 2025 13:25:36 -0500 Subject: [PATCH] simd/archsimd: guard test helpers with amd64 tag The test helpers load vectors. Currently the load functions are only available on AMD64, so guard them with the tag. Now GOEXPERIMENT=simd go test simd/... doesn't fail on a non-AMD64 machine. Change-Id: Ie75f1fbb3b91629bc477b3140630bc47a4ef5b63 Reviewed-on: https://go-review.googlesource.com/c/go/+/732380 LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase --- src/simd/archsimd/_gen/tmplgen/main.go | 2 +- src/simd/archsimd/internal/simd_test/binary_helpers_test.go | 2 +- src/simd/archsimd/internal/simd_test/compare_helpers_test.go | 2 +- .../archsimd/internal/simd_test/comparemasked_helpers_test.go | 2 +- src/simd/archsimd/internal/simd_test/ternary_helpers_test.go | 2 +- src/simd/archsimd/internal/simd_test/unary_helpers_test.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/simd/archsimd/_gen/tmplgen/main.go b/src/simd/archsimd/_gen/tmplgen/main.go index 473e4f14c0..46bd3cf8fc 100644 --- a/src/simd/archsimd/_gen/tmplgen/main.go +++ b/src/simd/archsimd/_gen/tmplgen/main.go @@ -278,7 +278,7 @@ func testPrologue(t, s string, out io.Writer) { fmt.Fprintf(out, `// Code generated by '%s'; DO NOT EDIT. -//go:build goexperiment.simd +//go:build goexperiment.simd && amd64 // This file contains functions testing %s. // Each function in this file is specialized for a diff --git a/src/simd/archsimd/internal/simd_test/binary_helpers_test.go b/src/simd/archsimd/internal/simd_test/binary_helpers_test.go index 9c361dbeb9..a834398a53 100644 --- a/src/simd/archsimd/internal/simd_test/binary_helpers_test.go +++ b/src/simd/archsimd/internal/simd_test/binary_helpers_test.go @@ -1,6 +1,6 @@ // Code generated by 'go run genfiles.go'; DO NOT EDIT. -//go:build goexperiment.simd +//go:build goexperiment.simd && amd64 // This file contains functions testing binary simd methods. // Each function in this file is specialized for a diff --git a/src/simd/archsimd/internal/simd_test/compare_helpers_test.go b/src/simd/archsimd/internal/simd_test/compare_helpers_test.go index 279fdc7155..a191605b0b 100644 --- a/src/simd/archsimd/internal/simd_test/compare_helpers_test.go +++ b/src/simd/archsimd/internal/simd_test/compare_helpers_test.go @@ -1,6 +1,6 @@ // Code generated by 'go run genfiles.go'; DO NOT EDIT. -//go:build goexperiment.simd +//go:build goexperiment.simd && amd64 // This file contains functions testing simd methods that compare two operands. // Each function in this file is specialized for a diff --git a/src/simd/archsimd/internal/simd_test/comparemasked_helpers_test.go b/src/simd/archsimd/internal/simd_test/comparemasked_helpers_test.go index 7ceee652a9..24790e5d26 100644 --- a/src/simd/archsimd/internal/simd_test/comparemasked_helpers_test.go +++ b/src/simd/archsimd/internal/simd_test/comparemasked_helpers_test.go @@ -1,6 +1,6 @@ // Code generated by 'go run genfiles.go'; DO NOT EDIT. -//go:build goexperiment.simd +//go:build goexperiment.simd && amd64 // This file contains functions testing simd methods that compare two operands under a mask. // Each function in this file is specialized for a diff --git a/src/simd/archsimd/internal/simd_test/ternary_helpers_test.go b/src/simd/archsimd/internal/simd_test/ternary_helpers_test.go index c37f9ef0ca..f31e7a32a0 100644 --- a/src/simd/archsimd/internal/simd_test/ternary_helpers_test.go +++ b/src/simd/archsimd/internal/simd_test/ternary_helpers_test.go @@ -1,6 +1,6 @@ // Code generated by 'go run genfiles.go'; DO NOT EDIT. -//go:build goexperiment.simd +//go:build goexperiment.simd && amd64 // This file contains functions testing ternary simd methods. // Each function in this file is specialized for a diff --git a/src/simd/archsimd/internal/simd_test/unary_helpers_test.go b/src/simd/archsimd/internal/simd_test/unary_helpers_test.go index e2610ad98b..64e538bda6 100644 --- a/src/simd/archsimd/internal/simd_test/unary_helpers_test.go +++ b/src/simd/archsimd/internal/simd_test/unary_helpers_test.go @@ -1,6 +1,6 @@ // Code generated by 'go run genfiles.go'; DO NOT EDIT. -//go:build goexperiment.simd +//go:build goexperiment.simd && amd64 // This file contains functions testing unary simd methods. // Each function in this file is specialized for a -- 2.52.0