Skip to content

Improve SIMD test diversity #1703

Open
Open
@SoniEx2

Description

@SoniEx2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions