pixel_aot: lower the plain VOP1/VOP3 v_movrel* forms with the existing m0 indexing #1732

Open
opened 2026-11-24 18:00:44 +00:00 by legacy-code-archaeologist · 3 comments
legacy-code-archaeologist commented 2026-11-24 18:00:44 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-24T18:00:44Z.


tools/pixel_aot.py lowers the quad-local DPP16/DPP8 forms of the four relative VGPR-indexing moves (commit 5654af9e, DPP_MOVREL_BODY, pixel_aot_dpp_movrel_{warp,hardware}). It does this with static m0 and with dynamic m0 whose bits are proven bounded. The plain encodings of the same four moves are still refused:

  • VOP1 (e32): v_movreld_b32, v_movrels_b32, v_movrelsd_b32, v_movrelsd_2_b32;
  • VOP3 (e64): v_movreld_b32_e64, v_movrels_b32_e64, v_movrelsd_b32_e64, v_movrelsd_2_b32_e64.

form_coverage --gaps gfx1030 lists all eight as unobserved (VOP1 46/81 on the dashboard), and they are in the gfx1013 reference list as well.

Proposed slice: lower these eight forms with the existing movrel indexing, without the quad swizzle.

  • Same m0 rules as the DPP forms: a static immediate, or a dynamic value with a proven bit mask that lowers to a bounded conditional select. v_movrelsd_2_b32 takes the source offset from m0[9:0] and the destination offset from m0[25:16].
  • Same refusals:
    • unbounded or interp_base m0;
    • an indexed VGPR above 255, or one not yet defined;
    • an overlap with an outstanding sample;
    • a mask other than the entry mask.
  • The e64 forms: accepted only without clamp/omod/modifiers. A move has none in LLVM's VOP3 spelling, and anything else is refused.
  • Out of scope: v_swaprel_b32 (a two-register exchange), the SDWA forms and the scalar s_movrel*.

Fixture plan, extending tests/pixel_aot_check.py next to draw-dpp-movrel, with LLVM 15 check_binary round trips:

  • All eight forms, with static m0 and with dynamic bounded m0 over two constant sets.
  • Overlapping source and destination banks (all sources are read before any write).
  • Controls that must fail: one that ignores m0, so the offset is dropped, and one that swaps the m0[9:0]/m0[25:16] halves for v_movrelsd_2.
  • Refusals: unbounded m0, an offset reaching v256, and an undefined indexed source.
  • Both _warp and _hardware tests. Locally the WARP draw is available, and the existing pixel_aot_dpp_movrel_warp passes here: 4096 pixels, max error 0.

Environment: Windows 11 26100, LLVM 15.0.7, DXC 10.0.26100, WARP 10.0.26100.8972; hardware Intel HD 530 / Quadro M1000M.

Is this scope OK? Should v_swaprel_b32 join it or stay a separate slice?

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6588178560 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1739). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-24T18:00:44Z. --- `tools/pixel_aot.py` lowers the quad-local DPP16/DPP8 forms of the four relative VGPR-indexing moves (commit 5654af9e, `DPP_MOVREL_BODY`, `pixel_aot_dpp_movrel_{warp,hardware}`). It does this with static `m0` and with dynamic `m0` whose bits are proven bounded. The plain encodings of the same four moves are still refused: - VOP1 (e32): `v_movreld_b32`, `v_movrels_b32`, `v_movrelsd_b32`, `v_movrelsd_2_b32`; - VOP3 (e64): `v_movreld_b32_e64`, `v_movrels_b32_e64`, `v_movrelsd_b32_e64`, `v_movrelsd_2_b32_e64`. `form_coverage --gaps gfx1030` lists all eight as unobserved (VOP1 46/81 on the dashboard), and they are in the gfx1013 reference list as well. **Proposed slice:** lower these eight forms with the existing movrel indexing, without the quad swizzle. - **Same `m0` rules as the DPP forms:** a static immediate, or a dynamic value with a proven bit mask that lowers to a bounded conditional select. `v_movrelsd_2_b32` takes the source offset from `m0[9:0]` and the destination offset from `m0[25:16]`. - **Same refusals:** - unbounded or `interp_base` `m0`; - an indexed VGPR above 255, or one not yet defined; - an overlap with an outstanding sample; - a mask other than the entry mask. - **The e64 forms:** accepted only without `clamp`/`omod`/modifiers. A move has none in LLVM's VOP3 spelling, and anything else is refused. - **Out of scope:** `v_swaprel_b32` (a two-register exchange), the SDWA forms and the scalar `s_movrel*`. **Fixture plan**, extending `tests/pixel_aot_check.py` next to `draw-dpp-movrel`, with LLVM 15 `check_binary` round trips: - All eight forms, with static `m0` and with dynamic bounded `m0` over two constant sets. - Overlapping source and destination banks (all sources are read before any write). - **Controls that must fail:** one that ignores `m0`, so the offset is dropped, and one that swaps the `m0[9:0]`/`m0[25:16]` halves for `v_movrelsd_2`. - **Refusals:** unbounded `m0`, an offset reaching v256, and an undefined indexed source. - Both `_warp` and `_hardware` tests. Locally the WARP draw is available, and the existing `pixel_aot_dpp_movrel_warp` passes here: 4096 pixels, max error 0. Environment: Windows 11 26100, LLVM 15.0.7, DXC 10.0.26100, WARP 10.0.26100.8972; hardware Intel HD 530 / Quadro M1000M. Is this scope OK? Should `v_swaprel_b32` join it or stay a separate slice?
tedin7 commented 2026-11-25 02:02:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:42:20Z.


Picking up plain VOP1/VOP3 v_movrel* lowering with existing m0 indexing in pixel_aot, with Linux + Win2025 verification tests.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149859668 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1739#issuecomment-7149859668). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T01:42:20Z. --- Picking up plain VOP1/VOP3 `v_movrel*` lowering with existing `m0` indexing in `pixel_aot`, with Linux + Win2025 verification tests.
tedin7 commented 2026-11-25 02:02:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:43:29Z.


Update: plain VOP1/VOP3 v_movrel* appears already on main via cf547ed4 (tests/pixel_aot_check.py, docs/experiments.md), so skipping — this issue can likely be closed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149881837 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1739#issuecomment-7149881837). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T01:43:29Z. --- Update: plain VOP1/VOP3 `v_movrel*` appears already on `main` via `cf547ed4` (`tests/pixel_aot_check.py`, `docs/experiments.md`), so skipping — this issue can likely be closed.
winne42 commented 2026-11-25 07:01:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by winne42 on 2026-11-25T06:40:46Z.


This looks complete on main and can be closed.

PR #1785 (cf547ed4) lowers all eight forms (v_movreld/movrels/movrelsd/movrelsd_2_b32, _e32 and _e64). It covers each item in the fixture plan above:

  • Draw: PLAIN_MOVREL_BODY is drawn twice, as written and with _e32/_e64 exchanged, so every form runs with static and with bounded dynamic m0. Both DPP_MOVREL_SETS are used. Registered as pixel_aot_plain_movrel_{warp,hardware} in CMakeLists.txt.
  • Controls that must fail: dynamic m0 replaced by 0 for v_movrels, v_movreld and v_movrelsd, and swapped m0[9:0]/m0[25:16] halves for v_movrelsd_2.
  • Refusals: interp_base m0, unbounded dynamic m0, a static offset past v255, an indexed VGPR past v255, an undefined indexed source, and the entry-mask refusal.
  • Docs: docs/experiments.md records WARP 10.0.26100.8972 and a Quadro M1000M on Windows 11 26100. The check_binary round trip was not run locally by the author.

v_swaprel_b32, the open question at the end, followed separately in #1844 (5a6ad936).

Independent device-free check on Linux, Python 3, main at 1949b265. I ran the plain-movrel block of check_binary on its own, from the Plain VOP1/VOP3 v_movrel* (#1739) comment up to the s_movrel* block. It needs only translate(), not llvm-mc. I also translated each of the eight forms with a static m0:

plain movrel translation controls: OK (8 forms, bounded selects, overlap, 5 refusals, entry mask)

Negative control at cf547ed4^:

REFUSED: Unsupported instruction 22: v_movrels_b32_e32 v12, v24

Not run here: the WARP and hardware draws (no Windows or D3D12 on this host) and the LLVM 15 check_binary round trip (this host has LLVM 21/22 only).

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7155044606 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1739#issuecomment-7155044606). Originally posted by [winne42](https://github.com/winne42) on 2026-11-25T06:40:46Z. --- This looks complete on `main` and can be closed. PR #1785 (`cf547ed4`) lowers all eight forms (`v_movreld/movrels/movrelsd/movrelsd_2_b32`, `_e32` and `_e64`). It covers each item in the fixture plan above: - **Draw:** `PLAIN_MOVREL_BODY` is drawn twice, as written and with `_e32`/`_e64` exchanged, so every form runs with static and with bounded dynamic `m0`. Both `DPP_MOVREL_SETS` are used. Registered as `pixel_aot_plain_movrel_{warp,hardware}` in `CMakeLists.txt`. - **Controls that must fail:** dynamic `m0` replaced by 0 for `v_movrels`, `v_movreld` and `v_movrelsd`, and swapped `m0[9:0]`/`m0[25:16]` halves for `v_movrelsd_2`. - **Refusals:** `interp_base` `m0`, unbounded dynamic `m0`, a static offset past v255, an indexed VGPR past v255, an undefined indexed source, and the entry-mask refusal. - **Docs:** `docs/experiments.md` records WARP 10.0.26100.8972 and a Quadro M1000M on Windows 11 26100. The `check_binary` round trip was not run locally by the author. `v_swaprel_b32`, the open question at the end, followed separately in #1844 (`5a6ad936`). Independent device-free check on Linux, Python 3, `main` at `1949b265`. I ran the plain-movrel block of `check_binary` on its own, from the `Plain VOP1/VOP3 v_movrel* (#1739)` comment up to the `s_movrel*` block. It needs only `translate()`, not `llvm-mc`. I also translated each of the eight forms with a static `m0`: ``` plain movrel translation controls: OK (8 forms, bounded selects, overlap, 5 refusals, entry mask) ``` Negative control at `cf547ed4^`: ``` REFUSED: Unsupported instruction 22: v_movrels_b32_e32 v12, v24 ``` Not run here: the WARP and hardware draws (no Windows or D3D12 on this host) and the LLVM 15 `check_binary` round trip (this host has LLVM 21/22 only). AI-assisted (Claude Code).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#1732
No description provided.