Stream: git-wasmtime

Topic: wasmtime / PR #13315 aarch64: Simplify and improve handli...


view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 04:53):

alexcrichton opened PR #13315 from alexcrichton:aarch64-refactor to bytecodealliance:main:

This commit refactors the aarch64 backend to match the x64 backend with how it handles conditionals. Specifically there's now a "narrow waist" of a CondResult type which is used for trapnz, trapz, select, icmp, brif, and select_spectre_guard. This means that any lowering optimizations to handle conditionals are equally applied to all of these locations. Notably the smattering of optimizations and implementations across these instructions have all been deduplicated an unified. Codegen of trap{n,}z is much better than before, and minor optimizations such as testing if an 8-bit value is 0 are now improved across the board. Finally, jumping after comparing a less-than-64-bit value now will use a 32-bit comparison instruction instead of a 64-bit comparison instruction, sometimes eliding the need to extend a 32-bit value to a 64-bit value.

During this refactoring the method of comparing 128-bit integers was copied over from the x64 backend as well. This additionally significantly improves codegen over the previous iteration.

The end result is that it should be significantly easier to apply optimizations and bug fixes in the future. For example some float comparison orderings are not yet currently supported in the aarch64 backend, but are supported in the x64 backend, and this paves the way to make it much easier to add support for this feature as only one comparison-generation location need be updated and a small set of do-something-with-a-comparison locations will be specialized to the condition necessary.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 04:53):

alexcrichton requested cfallin for a review on PR #13315.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 04:53):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #13315.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 04:53):

alexcrichton requested wasmtime-core-reviewers for a review on PR #13315.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 05:03):

alexcrichton updated PR #13315.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 05:13):

alexcrichton updated PR #13315.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 09:33):

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

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 09:33):

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

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 22:59):

:thumbs_up: cfallin submitted PR review:

Looks great -- thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 22:59):

cfallin added PR #13315 aarch64: Simplify and improve handling of conditionals to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2026 at 23:24):

github-merge-queue[bot] removed PR #13315 aarch64: Simplify and improve handling of conditionals from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2026 at 02:15):

alexcrichton added PR #13315 aarch64: Simplify and improve handling of conditionals to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2026 at 02:41):

:check: alexcrichton merged PR #13315.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2026 at 02:41):

alexcrichton removed PR #13315 aarch64: Simplify and improve handling of conditionals from the merge queue.


Last updated: Jun 01 2026 at 09:49 UTC