WebAssembly / WebAssembly/spec
Improve SIMD test diversity
Open
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 3.5k
- Forks
- 539
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 13
Description
SIMD tests do not have enough diversity to catch e.g. swapped lanes. It would be useful to have tests like:
(assert_return (invoke "i8x16.narrow_i16x8_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
(v128.const i16x8 8 9 10 11 12 13 14 15))
(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
(assert_return (invoke "i8x16.narrow_i16x8_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
(v128.const i16x8 8 9 10 11 12 13 14 15))
(v128.const i8x16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
(assert_return (invoke "i16x8.narrow_i32x4_s" (v128.const i32x4 1 2 3 4)
(v128.const i32x4 5 6 7 8))
(v128.const i16x8 1 2 3 4 5 6 7 8))
(assert_return (invoke "i16x8.narrow_i32x4_u" (v128.const i32x4 1 2 3 4)
(v128.const i32x4 5 6 7 8))
(v128.const i16x8 1 2 3 4 5 6 7 8))
(assert_return (invoke "i32x4.trunc_sat_f64x2_s_zero" (v128.const f64x2 1.0 2.0))
(v128.const i32x4 1 2 0 0))
(assert_return (invoke "i32x4.trunc_sat_f64x2_u_zero" (v128.const f64x2 1.0 2.0))
(v128.const i32x4 1 2 0 0))
among others.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing SIMD test files and reviewing their current assertions. Add representative lane-distinguishing cases like the narrow and truncation examples in the issue, along with other under-tested SIMD operations. Done means the suite covers lane ordering and produces distinct expected vectors for these operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100