Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve SIMD test diversity #1703

Open
SoniEx2 opened this issue Nov 5, 2023 · 1 comment
Open

Improve SIMD test diversity #1703

SoniEx2 opened this issue Nov 5, 2023 · 1 comment

Comments

@SoniEx2
Copy link
Contributor

SoniEx2 commented Nov 5, 2023

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.

@rossberg
Copy link
Member

rossberg commented Nov 5, 2023

Sounds good. Can you create a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants