Stream: git-wasmtime

Topic: wasmtime / PR #13964 cranelift(x64): fold the u8×i8 dot-a...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 19:57):

darmie opened PR #13964 from darmie:x64-vpdpbusd-upstream to bytecodealliance:main:

Adds AVX-VNNI vpdpbusd (VEX.128.66.0F38.W0 50 /r) to the x64 backend plus a has_avx_vnni ISA flag with host detection, and folds the signed×unsigned i8 widening dot-accumulate tree into a single instruction. This is the x64 version of the aarch64 sdot fold.

The rule matches iadd(iadd_pairwise(... swiden(imul(swiden a, uwiden b)) ...), acc) and lowers it to x64_vpdpbusd acc b a: a sign-extended, b zero-extended, which is exactly what vpdpbusd computes. Only the mixed u8×i8 form is matched; signed×signed (the sdot pattern) would need vpdpbssd and is left alone. Unmatched patterns keep the widening chain.

Tested with a compile filetest (; check: vpdpbusd) and runtests (including a b > 127 case so the unsigned reading is observable), and executed on Alder Lake AVX-VNNI hardware. VEX.128 only; EVEX/256-bit are follow-ups.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 19:57):

darmie requested cfallin for a review on PR #13964.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 19:57):

darmie requested wasmtime-compiler-reviewers for a review on PR #13964.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 20:09):

darmie updated PR #13964.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 20:09):

darmie requested wasmtime-core-reviewers for a review on PR #13964.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 20:27):

darmie updated PR #13964.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 22:03):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 22:03):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 22:03):

github-actions[bot] added the label cranelift:meta on PR #13964.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 22:03):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 22:03):

github-actions[bot] added the label wasmtime:api on PR #13964.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 22:03):

github-actions[bot] added the label wasmtime:config on PR #13964.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2026 at 22:04):

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

Subscribe to Label Action

cc @cfallin, @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:x64", "cranelift:meta", "isle", "wasmtime:api", "wasmtime:config"

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 (Jul 24 2026 at 23:03):

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

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

[fuzzing-config]: https://github.com/bytecodealliance/wasmtime/blob/ca0e8d0a1d8cefc0496dba2f77a670571d8fdcab/crates/fuzzing/src/generators.rs#L182-L194
[fuzzing-docs]: https://docs.wasmtime.dev/contributing-fuzzing.html


<details>

To modify this label's message, edit the <code>.github/label-messager/wasmtime-config.md</code> file.

To add new label messages or remove existing label messages, edit the
<code>.github/label-messager.json</code> configuration file.

Learn more.

</details>

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2026 at 00:47):

darmie commented on PR #13964:

Thanks! A couple of clarifications on the auto-applied labels and checklist:

wasmtime:config / wasmtime:api: this PR doesn't add or change any public Config method or configuration option. The config.rs and engine.rs edits are internal host-feature-detection plumbing (detect_host_feature, and the flag→feature-name map in check_compatible_with_native_host), required whenever a new Cranelift x86 ISA setting is added (here has_avx_vnni) so a serialized module's ISA flags can be checked against the host at load time. Without it, loading any cached module errors with don't know how to test for target-specific flag "has_avx_vnni" at runtime. So the Config-documentation, Config-fuzzing, and default-enablement items don't apply.

Testing the new lowering: the vpdpbusd fold has a compile filetest (isa/x64/simd-vpdpbusd.clif) and an executed runtest (runtests/simd-vpdpbusd.clif), including a b > 127 case so the unsigned reading is observable; the runtest runs under the Intel-SDE CI job on emulated AVX-VNNI. One thing worth flagging directly: the assembler-x64 fuzz roundtrip skips vpdpbusd, because the bundled capstone (0.14) doesn't disassemble AVX-VNNI and so has no reference to compare against; the encoding is instead verified by that executed runtest. Happy to take a different approach to the disassembler gap if you'd prefer.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2026 at 21:06):

:thumbs_up: cfallin submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2026 at 21:06):

cfallin added PR #13964 cranelift(x64): fold the u8×i8 dot-accumulate tree to vpdpbusd (AVX-VNNI) to the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2026 at 22:11):

github-merge-queue[bot] removed PR #13964 cranelift(x64): fold the u8×i8 dot-accumulate tree to vpdpbusd (AVX-VNNI) from the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2026 at 22:15):

alexcrichton added PR #13964 cranelift(x64): fold the u8×i8 dot-accumulate tree to vpdpbusd (AVX-VNNI) to the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2026 at 23:02):

:check: alexcrichton merged PR #13964.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2026 at 23:02):

alexcrichton removed PR #13964 cranelift(x64): fold the u8×i8 dot-accumulate tree to vpdpbusd (AVX-VNNI) from the merge queue


Last updated: Jul 29 2026 at 05:03 UTC