Stream: git-wasmtime

Topic: wasmtime / PR #14436 cranelift: don't emit FEAT_FP16 inst...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 13:42):

dsecurity49 opened PR #14436 from dsecurity49:f16-aarch64-and-interpreter to bytecodealliance:main:

Two f16 fixes for AArch64, plus interpreter support so f16 can be tested.

f16 arithmetic on AArch64 was emitting half-precision instructions without FEAT_FP16, which are UNDEFINED (Arm ARM, C7.2.73 FCVT). fadd.f16 on plain target aarch64 compiled to fadd h0, h0, h1 and trapped at run time. Adds a ty_scalar_float_with_fp16 extractor mirroring the RISC-V Zfh gate, makes the four fma constructors partial so the negated forms report instead of panicking, and lowers fcopysign.f16 in integer registers, which previously panicked.

The interpreter only handled F32/F64, so test interpret failed on f16 and fuzzgen had no oracle for it. Adds Ieee16::to_f32 and from_f32_rne/from_f64_rne, with fma widening to f64 so the exact product and sum survives.

Includes precise-output filetests for the new lowerings, and test interpret on the f16 runtests.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 13:42):

dsecurity49 requested cfallin for a review on PR #14436.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 13:42):

dsecurity49 requested wasmtime-compiler-reviewers for a review on PR #14436.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 14:27):

dsecurity49 updated PR #14436.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 15:49):

github-actions[bot] added the label cranelift:area:aarch64 on PR #14436.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 15:49):

github-actions[bot] added the label cranelift on PR #14436.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 15:49):

github-actions[bot] added the label isle on PR #14436.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 15:50):

github-actions[bot] commented on PR #14436:

Subscribe to Label Action

cc @avanhatt, @cfallin, @fitzgen, @mmcloughlin

<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "isle"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 23:53):

:memo: cfallin submitted PR review:

Thanks! A few comments below mostly about style but overall looks fine.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 23:53):

:speech_balloon: cfallin created PR review comment:

Let's keep these in the one mod test, idiomatically, not a separate ..._tests module at the top level.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 23:53):

:speech_balloon: cfallin created PR review comment:

A bit too much detail here makes it unclear -- maybe just "partial so that unsupported cases fail at the top level rather than panicking"

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 23:53):

:speech_balloon: cfallin created PR review comment:

Let's fix the indentation here -- we don't exactly have one consistent style, but this one (N spaces before the start of the RHS on same line, then the rest of the RHS indented less on new lines) is quite nonstandard.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 28 2026 at 23:53):

:speech_balloon: cfallin created PR review comment:

We usually don't combine predicates like this -- better to have a separate ISA-feature flag and check with if-let, as it makes the intent more clear in lowering rules.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 08:19):

dsecurity49 updated PR #14436.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 09:47):

dsecurity49 commented on PR #14436:

Done. The f16 tests are in the existing mod tests with the _ieee16 suffix, and the feature check is now an explicit $F16 rule guarded by (if-let true (use_fp16)) next to $F32/$F64, like fpu_csel. The fmadd priorities had to shift to make room — F16 needs to sit below the negation rules so fma(-x, y, z) stays a single fmsub. Codegen is byte-identical for f32/f64/vector fma either way.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2026 at 12:25):

dsecurity49 requested cfallin for a review on PR #14436.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2026 at 16:46):

:thumbs_up: cfallin submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2026 at 16:46):

cfallin added PR #14436 cranelift: don't emit FEAT_FP16 instructions without the feature, and support f16 in the interpreter to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2026 at 17:33):

github-merge-queue[bot] removed PR #14436 cranelift: don't emit FEAT_FP16 instructions without the feature, and support f16 in the interpreter from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2026 at 17:36):

alexcrichton added PR #14436 cranelift: don't emit FEAT_FP16 instructions without the feature, and support f16 in the interpreter to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2026 at 18:03):

:check: alexcrichton merged PR #14436.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2026 at 18:03):

alexcrichton removed PR #14436 cranelift: don't emit FEAT_FP16 instructions without the feature, and support f16 in the interpreter from the merge queue.


Last updated: Oct 11 2026 at 04:10 UTC