镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

WebAssembly SIMD: integer lane arithmetic and comparisons #281

Closed

Description

@chrisbbreuer

Parent: #264
Depends on: #279, #280
Roadmap: #142, #134

Implement every pinned fixed-width-SIMD integer instruction over the portable v128 substrate.

Acceptance:

  • Implement i8x16/i16x8/i32x4/i64x2 comparisons, shifts, boolean reductions, and ordinary arithmetic.
  • Implement signed/unsigned saturating arithmetic, min/max/average, narrowing, widening, extadd/extmul, pairwise extension, dot, and q15 operations.
  • Match lane-width wrapping, signedness, shift masking, and saturation exactly without host undefined behavior.
  • Keep one architecture-independent scalar oracle/fallback and prove any native acceleration bit-identical against it.
  • Publish per-family focused official-corpus totals with zero hidden exclusions.

Activity

  1. chrisbbreuer commented on Jul 18, 2026

    @chrisbbreuer
    MemberAuthor

    First portable integer checkpoint is on main as 40d9e018: every i8x16/i16x8/i32x4 comparison, every standardized i64x2 comparison, and all four all_true/bitmask reductions now execute lane-by-lane without host-vector assumptions. Signed lanes are explicitly extended before comparison and true lanes are reconstructed at their exact width.

    Pinned official evidence (WABT 1.0.39, proposal a78b98a…):

    • simd_boolean.wast: 273/273 applicable, 4 text-format n/a
    • simd_i8x16_cmp.wast: 445/445
    • simd_i16x8_cmp.wast: 465/465
    • simd_i32x4_cmp.wast: 465/465 applicable, 10 text-format n/a
    • simd_i64x2_cmp.wast: 113/113

    That is 1,761/1,761 applicable commands across the five focused files, zero failures and zero runner errors. This also removes 138 of #280’s 184 shared-file blockers; wrapping arithmetic and shifts are next.

  2. chrisbbreuer commented on Jul 18, 2026

    @chrisbbreuer
    MemberAuthor

    Two more portable scalar checkpoints are now on main:

    • d1d5b113: abs/neg/popcnt, width-masked signed/unsigned shifts, and wrapping add/sub/mul.
    • 9a82d87d: signed/unsigned saturating add/sub, min/max, and rounded unsigned averages.

    New pinned official green files: simd_bit_shift 237/237 applicable; simd_i8x16_sat_arith 202/202; simd_i16x8_sat_arith 218/218; simd_i8x16_arith 131/131; simd_i16x8_arith 194/194. The shared simd_lane and simd_const files are also now 369/369 and 577/577 applicable. All have zero failures and zero runner errors; text-format n/a remains explicit. Narrow/widen, extadd/extmul, dot, and q15 are next.

  3. chrisbbreuer commented on Jul 18, 2026

    @chrisbbreuer
    MemberAuthor

    Completed on main. Final implementation checkpoint 08e29a5f adds narrowing, all low/high signed+unsigned extension and extmul forms, pairwise extension-add, dot, and q15 rounding/saturation; 32e4f60d publishes the terminal score in README/docs.

    Across the declared 24 focused official integer files: 4,380/4,380 applicable pass, 0 fail, 65 explicit text-format n/a, 0 runner errors. The implementation is architecture-independent scalar code with explicit lane widths, signed extension, wrapping, shift masks, and clamps; no native acceleration exists, so it is also the oracle future optimized paths must match. All five acceptance items are checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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