[dev.simd] simd: fix arm64 test build for TruncTo and uint64 shifts
Two recent renames left the arm64 test tree failing 'go vet simd/...':
1. The 'TruncateToX -> TruncToX' rename in CL 783001 (commit
3e04a409d1) was applied as a sed-style replacement on identifiers
that already started with 'TruncateTo', producing 'TruncToTo*'
(note the doubled 'To') in the hand-authored TestTruncateArm64.
The methods on the archsimd types are spelled TruncToInt8/16/32
and TruncToUint8/16/32; replace the six call sites in
arm64_convert_test.go with the correct names.
2. The 'shift and rotate take uint64' change in CL 783003 (commit
fed139a1b3) widened the shift-amount parameter on every Int*/Uint*
shift method to uint64, but left the arm64 test helpers and slice
simulators on uint8. Update them to match:
- _gen/tmplgen/main.go shiftConstTestTemplateArm64 generates
uint64-typed test helpers (function signature and the inner
amt-range slice).
- arm64_shift_helpers_test.go is the corresponding regenerated
output.
- simulation_helpers_test.go shift{Left,Right}ByConstSlice and
shiftLeftSaturating{,U}ByConstSlice now take uint64.
- arm64_shift_test.go testShiftConstAmt and the
TestConcatShiftBytesRight closures (csbr, hide, shift loop) take
uint64 to match ConcatShiftBytesRight's widened parameter.
After this change 'go vet simd/...' is clean and 'go test simd/...'
passes on linux/arm64.
Change-Id: I106f6e1d7e8df70201f3969b193747c812984805
Reviewed-on: https://go-review.googlesource.com/c/go/+/783880
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com> J
Jonathan Swinney committed
ecc340ee9ce4195bfed5769b46d17895ec3b0b41
Parent: 10231ce
Committed by Gopher Robot <gobot@golang.org>
on 5/27/2026, 5:21:54 PM