Stream: git-wasmtime

Topic: wasmtime / PR #14636 Preserve stores across divergent loops


view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 20:22):

agourakis82 opened PR #14636 from agourakis82:fix/14573-divergent-store to bytecodealliance:main:

Fixes #14573.

Dead-store elimination can remove a trapping store before a loop because a later store post-dominates it. If execution stays in the loop, the overwriter never executes, turning an immediate trap into a hang.

Mark the last-store state as observed on CFG edges that do not decrease DFS postorder. Every cycle contains such an edge, including irreducible cycles. This conservatively limits DSE across cycles while retaining cross-block elimination in acyclic control flow.

The regression test covers infinite loops, loops with exit edges, stores in divergent blocks, irreducible cycles, non-trapping stores, and an acyclic control case.

Validation:

The shared-memory experiment is supplementary evidence because it depends on thread scheduling. A local debug-build timing comparison measured a 2.05% increase in median end-to-end filetest time; production throughput and isolated pass cost have not been measured.

Signed-off-by: Demetrios Agourakis <demetrios@agourakis.med.br><!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

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 (Oct 09 2026 at 20:22):

agourakis82 requested fitzgen for a review on PR #14636.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 20:22):

agourakis82 requested wasmtime-compiler-reviewers for a review on PR #14636.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 20:29):

:cross_mark: cfallin closed without merge PR #14636.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 20:29):

cfallin commented on PR #14636:

#14632 already fixes this and is in the merge queue, so closing this as a duplicate fix -- thanks though!


Last updated: Oct 11 2026 at 04:10 UTC