You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pixel_aot: lower the SDWA v_movrel* forms with the movrel m0 indexing #1917
Last movrel encoding after #1785/#1844/#1894: pixel_aot refuses the SDWA forms of the four VGPR relative moves, v_movreld_b32_sdwa, v_movrels_b32_sdwa, v_movrelsd_b32_sdwa and v_movrelsd_2_b32_sdwa. They are in the gfx1013 and gfx1030 reference lists. LLVM 15 decodes them identically for both targets, for example:
Proposed slice: route them through the existing movrel block. The m0 rules, the refusals and source-before-destination reads all stay the same. Add the SDWA selections that v_mov_b32_sdwa already lowers:
Source: the indexed word goes through sdwa_source, with src0_sel and an optional sext(...).
Destination: each indexed destination goes through sdwa_dest, with dst_sel and UNUSED_PAD or UNUSED_PRESERVE.
With UNUSED_PRESERVE, the kept bits come from that destination register's own tracked old value.
Under a dynamic m0, every reachable destination merges its own old value.
Refused:
UNUSED_SEXT (as for v_mov_b32_sdwa);
UNUSED_PRESERVE into an untracked destination;
16-bit tracked values (low-half results);
SGPR or constant sources.
Fixture plan:
A draw with each move under static and dynamic m0, mixing BYTE, WORD and DWORD selections, sext, PAD and PRESERVE, on the two DPP_MOVREL_SETS.
Controls: the source selection dropped, PRESERVE turned into PAD, and m0 ignored.
Refusals and device-free pins of the generated selects.
The LLVM 15 round trip, which now runs locally too.
I independently checked the same-bank case in #2472. Each v_movrelsd_2_b32_sdwa selects the source and destination from the same four-register bank and exports every register separately. All 16 pairs matched the bitfield reference on Intel UHD 770, GeForce RTX 4060 and WARP. An equal source and destination still changes BYTE_1.
Two changed shaders separated the cases: an elided same-register copy failed at exactly the four equal pairs; swapping the two offsets failed at exactly the twelve unequal pairs. I also tested the previous full device-free controls and GPU draw against a source-index truncation restricted to shared banks. Both originally passed; the new draw caught all eight uses of source index 2 or 3 on all three adapters. The included gfx1013/gfx1030 instruction was round-tripped with LLVM 15. These GPU results cover the translated shader; the ISA indexing follows the existing #1934 model.
Closing the scoped SDWA movrel implementation and regression work. #1934 landed support for the four forms with static and dynamic m0, refused forms and selection controls. #2472 adds translated draw coverage for all 16 overlapping source and destination pairs; the diagonal no-op and reversed-index controls fail as expected. These results establish the source-built translator behavior. The ISA selection order remains documented as a model pending native RDNA evidence.
Activity
shader: lower the SDWA v_movrel* forms in pixel_aot
tests: pin the SDWA v_movrel* selections without a GPU
RavenCurseBurg commentedon Nov 25, 2026
I independently checked the same-bank case in #2472. Each
v_movrelsd_2_b32_sdwaselects the source and destination from the same four-register bank and exports every register separately. All 16 pairs matched the bitfield reference on Intel UHD 770, GeForce RTX 4060 and WARP. An equal source and destination still changes BYTE_1.Two changed shaders separated the cases: an elided same-register copy failed at exactly the four equal pairs; swapping the two offsets failed at exactly the twelve unequal pairs. I also tested the previous full device-free controls and GPU draw against a source-index truncation restricted to shared banks. Both originally passed; the new draw caught all eight uses of source index 2 or 3 on all three adapters. The included gfx1013/gfx1030 instruction was round-tripped with LLVM 15. These GPU results cover the translated shader; the ISA indexing follows the existing #1934 model.
AI-assisted with Codex + GPT-6.2 Astra (xhigh).
R0Y00 commentedon Nov 25, 2026
Closing the scoped SDWA movrel implementation and regression work. #1934 landed support for the four forms with static and dynamic m0, refused forms and selection controls. #2472 adds translated draw coverage for all 16 overlapping source and destination pairs; the diagonal no-op and reversed-index controls fail as expected. These results establish the source-built translator behavior. The ISA selection order remains documented as a model pending native RDNA evidence.