diff options
| author | whoalin1 <207920491+whoalin1@users.noreply.github.com> | 2026-11-25 12:55:28 +0200 |
|---|---|---|
| committer | Man Alin <whoalin414@gmail.com> | 2026-11-30 22:22:44 +0000 |
| commit | b3cc3770200c8701c01b492edae3f20793924287 (patch) | |
| tree | 72a4ed647131cdea1f2a83727e2e0f788cb66e21 /runtime/src/thread_stacks.cpp | |
| parent | 1725e0818a8406c3e21457d1520755bf2d880a52 (diff) | |
translator: s_mov copies of EXEC keep the narrowing's tag through SGPR round-trips
Review follow-up on the mask-word gather gate (#1397): `s_mov_b32 s4,
exec_lo` under an unknown EXEC narrowing recorded nothing for s4, so the
later `s_mov_b32 exec_lo, s4` restore minted a fresh ("n", id) tag in
_exec_src_ex. mask_exec_sigs coverage then failed and the read kept this
lane's 0 / ~0 bit, while the equivalent literal `s_mov_b32 exec_lo, -1`
resolved to a constant half-state and gathered — register and literal
restores of the same runtime value disagreed.
_mov_sgpr_vals now returns an ("al", halves) alias for an EXEC source
whose half-state is an unknown narrowing, the same scheme saveexec uses:
exec_lo gives (state, None), exec_hi (None, state), exec gives each half
in its own register for b64 moves. _exec_src_ex already resolves those
aliases, so the restore reproduces the original tag and the gather stays
exact; untracked SGPR sources still mint a fresh narrowing and stay
conservative.
Tests: two semantic cases (wave32 and wave64) assert the register
round-trip gathers OpGroupNonUniformBitwiseOr identically to the literal
-1 restore; cs_exec_copy.asm (+ fixture, check.py/run_gpu_tests.py dump
entries) stores the mask word, exec_lo's own word and the literal-restore
word side by side on real hardware — PASS on RTX 4070 and Radeon
(64-wide), wave64 exec filters 9/9 on AMD.
Co-Authored-By: Devin <noreply@cognition.ai>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions