Skip to content

Validate remaining FP16 instruction features - #8979

Open
ANAMASGARD wants to merge 1 commit into
WebAssembly:mainfrom
ANAMASGARD:fix/fp16-simd-ternary-validation
Open

Validate remaining FP16 instruction features#8979
ANAMASGARD wants to merge 1 commit into
WebAssembly:mainfrom
ANAMASGARD:fix/fp16-simd-ternary-validation

Conversation

@ANAMASGARD

Copy link
Copy Markdown

Fixes #8313

Summary

  • Move seven unguarded FP16 unary conversion case labels into the existing FP16-guarded fallthrough group in visitUnary
  • Require FP16 for f32.load_f16 and f32.store_f16 in visitLoad/visitStore
  • Add lit regression tests: 7 independent unary modules + 2 independent memory modules via foreach
    The SIMDTernary madd/nmadd case from the original report was fixed by Validate SIMDTernary features #8403; this PR closes the remaining identifiable FP16 validation gaps found by audit.

Test plan

  • build-clang/bin/binaryen-lit test/lit/validation/fp16-unary.wast -v
  • build-clang/bin/binaryen-lit test/lit/validation/fp16-memory.wast -v
  • build-clang/bin/binaryen-lit test/lit/validation -v
  • ./check.py --binaryen-bin build-clang/bin validator

The originally reported SIMDTernary case was fixed by WebAssembly#8403. This adds
missing FP16 feature validation for seven unary conversion ops and
f32.load_f16/f32.store_f16 when --enable-fp16 is not set. Fixes WebAssembly#8313.

Signed-off-by: Gaurav Chaudhary <chaudharygaurav2004@gmail.com>
@ANAMASGARD
ANAMASGARD requested a review from a team as a code owner August 7, 2026 11:28
@ANAMASGARD
ANAMASGARD requested review from stevenfontanella and removed request for a team August 7, 2026 11:28
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

Successfully merging this pull request may close these issues.

Missing fp16 type validation

1 participant