fitzgen opened PR #14162 from fitzgen:alias-analysis-and-endianness to bytecodealliance:main:
Do not forward the value from a store at memory location
Lto a load ofLwhen the store was big endian and the load is little endian, or vice versa. Similar for redundant-load elimination.Note that dead-store elimination overwrites the same range of bytes in memory regardless of byte order, so it can still happen when the dead store is big and the overwriter is little or vice versa, so long as we update the memory state to correctly record the overwriter's byte order.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen requested cfallin for a review on PR #14162.
fitzgen requested wasmtime-compiler-reviewers for a review on PR #14162.
:thumbs_up: cfallin submitted PR review:
Good catch -- thanks!
cfallin added PR #14162 Alias analysis: do not eliminate loads with different byte orders to the merge queue.
cfallin commented on PR #14162:
Backport note: perhaps we should get this into
release-48.0as well since it's a known bug in Cranelift (albeit theoretically unreachable from Wasmtime)?
:check: cfallin merged PR #14162.
cfallin removed PR #14162 Alias analysis: do not eliminate loads with different byte orders from the merge queue.
Last updated: Aug 30 2026 at 10:08 UTC