Stream: git-wasmtime

Topic: wasmtime / PR #14796 perf(x64): optimize i8 multiplicatio...


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

shrayjaiswal050-design opened PR #14796 from shrayjaiswal050-design:fix/x64-i8-imul-imm to bytecodealliance:main:

Fixes #14660.

On x64, multiplying an i8 value by a constant currently uses mulb
and can load the constant from memory. This uses a 32-bit immediate
imul instead, which gives the same low-byte result.

Byte loads remain byte-sized. Added tests for both operand orders,
wrapping results, negative constants, and inputs with unused upper bits.

Tested on Windows x64:

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

shrayjaiswal050-design requested wasmtime-compiler-reviewers for a review on PR #14796.

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

shrayjaiswal050-design requested alexcrichton for a review on PR #14796.

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

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

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

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

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

:memo: alexcrichton submitted PR review.

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

:speech_balloon: alexcrichton created PR review comment:

Can this use the precise-output mode to get the full golden output listed here?

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

:speech_balloon: alexcrichton created PR review comment:

Could this perhaps have rules for $I16 as well since it seems equally applicable? Also -- are you sure this doesn't need to extend the x and y arguments appropriately? I forget the rules around multiplication and bits so I'm not sure myself


Last updated: Oct 31 2026 at 23:03 UTC