Stream: git-wasmtime

Topic: wasmtime / PR #13399 Fix double `lr.w` in sub-word `atomi...


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

surajk-m opened PR #13399 from surajk-m:fix/issue-13076 to bytecodealliance:main:

Closes #13076.

Sub-word atomic_rmw (i8/i16) loops on riscv64 emitted a second lr.w.aqrl before the merge step, which cancelled the reservation from the first LR. The sc.w.aqrl was then paired only with the reload, breaking atomicity.

Fix: replace the second LR with gen_move to stash the already loaded word into spilltmp2, so the loop keeps a single LR/SC pair.

Affected ops: add, sub, and, or, xor, nand, xchg, umin, umax, smin, smax for i8/i16.

A dedicated filetest (issue-13076.clif) pins the single LR/SC shape for each affected op.

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

surajk-m requested cfallin for a review on PR #13399.

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

surajk-m requested wasmtime-compiler-reviewers for a review on PR #13399.

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

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

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

:thumbs_up: cfallin submitted PR review:

Thanks!

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

cfallin added PR #13399 Fix double lr.w in sub-word atomic_rmw loops to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 19:39):

:check: cfallin merged PR #13399.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 19:39):

cfallin removed PR #13399 Fix double lr.w in sub-word atomic_rmw loops from the merge queue.


Last updated: Jun 01 2026 at 09:49 UTC