pixel_aot: lower the SDWA v_movrel* forms with the movrel m0 indexing #1917
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#1917
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@legacy-code-archaeologist on GitHub · 2026-11-24 21:08 UTC · original
Last movrel encoding after #1785/#1844/#1894:
pixel_aotrefuses the SDWA forms of the four VGPR relative moves,v_movreld_b32_sdwa,v_movrels_b32_sdwa,v_movrelsd_b32_sdwaandv_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
m0rules, the refusals and source-before-destination reads all stay the same. Add the SDWA selections thatv_mov_b32_sdwaalready lowers:sdwa_source, withsrc0_seland an optionalsext(...).sdwa_dest, withdst_selandUNUSED_PADorUNUSED_PRESERVE.UNUSED_PRESERVE, the kept bits come from that destination register's own tracked old value.m0, every reachable destination merges its own old value.UNUSED_SEXT(as forv_mov_b32_sdwa);UNUSED_PRESERVEinto an untracked destination;Fixture plan:
m0, mixing BYTE, WORD and DWORD selections,sext, PAD and PRESERVE, on the twoDPP_MOVREL_SETS.m0ignored.@RavenCurseBurg on GitHub · 2026-11-25 17:21 UTC · original · edited 2026-11-25 17:42 UTC
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 on GitHub · 2026-11-25 19:23 UTC · original
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.