Stream: git-wasmtime

Topic: wasmtime / PR #14795 cranelift: Simplify i8/i16 division ...


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

pujitha24 opened PR #14795 from pujitha24:auto/issue-14694 to bytecodealliance:main:

Report: https://github.com/bytecodealliance/wasmtime/issues/14694

Narrow (i8/i16) sdiv/udiv by a constant non-power-of-two divisor were left as trapping skeleton instructions, so they were not removed even when the result was unused (i32/i64 already were, via the magic-number rewrite). This extends i8/i16 operands to i32, reuses the i32 magic sequence, and reduces the result.

Validated with cargo test -p cranelift-filetests, cargo test -p cranelift-codegen, and new egraph and run tests (run on this aarch64 machine; x86_64/s390x/riscv64 targets in the run test were not executed here). Divisors of -1 and powers of two are excluded, so the INT_MIN / -1 trap is unchanged.

I used an AI tool to help with this change and reviewed it myself.

This PR was written in part with the assistance of generative AI.

Fixes #14694

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

pujitha24 requested alexcrichton for a review on PR #14795.

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

pujitha24 requested wasmtime-compiler-reviewers for a review on PR #14795.

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

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

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

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

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

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

Subscribe to Label Action

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

<details>
This issue or pull request has been labeled: "cranelift", "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 (Oct 19 2026 at 14:49):

:thumbs_up: alexcrichton submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 14:49):

alexcrichton added PR #14795 cranelift: Simplify i8/i16 division by constants via i32 to the merge queue.

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

:check: alexcrichton merged PR #14795.

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

alexcrichton removed PR #14795 cranelift: Simplify i8/i16 division by constants via i32 from the merge queue.


Last updated: Oct 31 2026 at 23:03 UTC