Skip to content

fix(native): store the mask plane of wide two-state values - #2425

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/native-wide-concat/store-mask-plane-wide-two-state-values--f46d411b
Oct 28, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/native-wide-concat/store-mask-plane-wide-two-state-values--f46d411b

Conversation

@tignear

@tignear tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

On the native x86 and arm64 backends, a store wider than 64 bits into a
4-state variable wrote its mask plane only when the source register had
wide mask chunks. A wide register loaded from a 2-state variable, or
produced by a 2-state operation, has at most a scalar mask, so the
destination kept a stale mask and read back as X or Z.

This showed up in 4-state simulation of a concatenation assignment from a
2-state value wider than 64 bits in a process, {x, y, z} = w: the value
is captured in a 4-state temporary and its slices are assigned, so the
targets read 0 (or X for 4-state targets), while Cranelift and wasm gave
the right values. The store now always writes every mask bit: the source's
wide mask chunks when it has them, otherwise its scalar mask for the low
chunk and zero above.

On the native x86 and arm64 backends, a store wider than 64 bits into a
4-state variable wrote its mask plane only when the source register had
wide mask chunks. A wide register loaded from a 2-state variable, or
produced by a 2-state operation, has at most a scalar mask, so the
destination kept a stale mask and read back as X or Z.

This showed up in 4-state simulation of a concatenation assignment from a
2-state value wider than 64 bits in a process, `{x, y, z} = w`: the value
is captured in a 4-state temporary and its slices are assigned, so the
targets read 0 (or X for 4-state targets), while Cranelift and wasm gave
the right values. The store now always writes every mask bit: the source's
wide mask chunks when it has them, otherwise its scalar mask for the low
chunk and zero above.

Change-Id: If46d411b2f1bc2e1aa4f99f79033b09df4e11067
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T10:42:48.442913Z c1a0bbf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 28, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 28, 2026
@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as 7153455 at 12:03 UTC

32 min in the queue, 30 min of it CI.

So far

Merge conditions: 7 of 7 met

The batch, tested on draft #2431

Condition Required by
✅ check-success = Conventional Commit title —
✅ check-success = Queue validation —
✅ any of: check-success = @github-actions/Lint & Format, check-neutral = @github-actions/Lint & Format, check-skipped = @github-actions/Lint & Format GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Rust Test & NAPI Build, check-neutral = @github-actions/Rust Test & NAPI Build, check-skipped = @github-actions/Rust Test & NAPI Build GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/JS Test (Ubuntu), check-neutral = @github-actions/JS Test (Ubuntu), check-skipped = @github-actions/JS Test (Ubuntu) GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Conventional Commit title, check-neutral = @github-actions/Conventional Commit title, check-skipped = @github-actions/Conventional Commit title GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Queue validation, check-neutral = @github-actions/Queue validation, check-skipped = @github-actions/Queue validation GitHub repository ruleset rule master

Times in UTC · dashboard · how the merge queue works

@mergify
mergify Bot merged commit 7153455 into master Oct 28, 2026
23 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/native-wide-concat/store-mask-plane-wide-two-state-values--f46d411b branch October 28, 2026 12:03
@mergify mergify Bot removed the queued Mergify queue entry label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant