Stream: git-wasmtime

Topic: wasmtime / PR #13071 x64: Fix sinking loads band/bor/bxor


view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 18:51):

alexcrichton opened PR #13071 from alexcrichton:load-fewer-bytes-again to bytecodealliance:main:

This commit fixes the x64 backend in Cranelift when sinking loads into band/bor/bxor instructions. If this happens for scalar types like f32 and f64 this means that the generated instruction will load too many bytes, similar to #13011 for example. These rules aren't reachable from WebAssembly but are still good to have fixed.

<!--
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 (Apr 13 2026 at 18:51):

alexcrichton requested uweigand for a review on PR #13071.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 18:51):

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

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 20:04):

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

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 20:04):

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

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2026 at 21:11):

theotherjimmy submitted PR review:

Seems sensible to me.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2026 at 21:24):

alexcrichton unassigned uweigand from PR #13071 x64: Fix sinking loads band/bor/bxor.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2026 at 21:24):

alexcrichton requested fitzgen for a review on PR #13071.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2026 at 23:33):

fitzgen submitted PR review:

This one might make sense to have wast tests for that do the operation at the end of memory, so that if our memory access is too wide, we will (incorrectly) trap.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2026 at 14:41):

alexcrichton commented on PR #13071:

Agreed! However I haven't added those here because I don't think I can insofar as wasm can't reach these rules (bitops on floats). Given that I'm going to go ahead and merge but if you know of how these are reachable from wasm @fitzgen lemme know

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2026 at 14:41):

alexcrichton added PR #13071 x64: Fix sinking loads band/bor/bxor to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2026 at 15:06):

alexcrichton merged PR #13071.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2026 at 15:06):

alexcrichton removed PR #13071 x64: Fix sinking loads band/bor/bxor from the merge queue.

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

fitzgen commented on PR #13071:

Agreed! However I haven't added those here because I don't think I can insofar as wasm can't reach these rules (bitops on floats). Given that I'm going to go ahead and merge but if you know of how these are reachable from wasm @fitzgen lemme know

I don't I was just thinking out loud


Last updated: May 03 2026 at 22:13 UTC