pixel_aot: lower the scalar s_movrel* moves with static or bounded m0 #1882
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#1882
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 20:03 UTC · original
Scalar follow-up to #1739/#1785/#1844:
pixel_aotrefuses the five SOP1 relative-indexing moves.s_movrels_b32,s_movrels_b64,s_movreld_b32,s_movreld_b64ands_movrelsd_2_b32.be942e28s_movrels_b32 s20, s40,…2f…_b64 s[20:21], s[40:41],…30…/…31…s_movreld_b32/_b64,…49…s_movrelsd_2_b32.Semantics (RDNA 2 naming, the same split as the vector forms):
s_movrels:sdst = SGPR[ssrc + m0].s_movreld:SGPR[sdst + m0] = ssrc.s_movrelsd_2_b32:SGPR[sdst + m0[25:16]] = SGPR[ssrc + m0[9:0]]._b64forms move a pair.Proposed slice:
m0: the move is exactly ans_mov_b32/s_mov_b64from or to the indexed SGPR. The tracked value (constant, expression, descriptor or pointer word) and its bit mask carry over unchanged, ass_mov_b32does today.m0with a proven bit mask: accepted only when every reachable source SGPR holds a plain 32-bit value, a constant or auintexpression. The result is a bounded select, and its mask is the OR of the reachable masks. Fors_movreld, each reachable destination gets a select with its old value. Descriptor, pointer or otherwise symbolic sources are refused, so resource tracking never depends on a runtime index.m0;_b64, an odd effective pair base, because I don't want to guess at pair alignment.Fixture plan:
DPP_MOVREL_SETSwith static and dynamicm0, into an exported value.s_movrels_b64still drives ans_load, so tracking is preserved.m0ignored, and them0halves swapped fors_movrelsd_2.m0, a symbolic source under dynamicm0, an odd_b64base, and an index past the last SGPR.Is this scope OK?
@ChazY11 on GitHub · 2026-11-24 20:35 UTC · original
Implemented by #1894 (
shader/scalar-movrel, merged as23d9d12d), which lowers all five instead of refusing them:The dispatch is in
tools/pixel_aot.pyline 3838:so the five names the description lists are exactly what it handles, with the
_b64pair form and the split-halfs_movrelsd_2_b32distinguished.tests/pixel_aot_check.pygrows 217 lines of cases around them, and the controls pass on this machine:Nothing left to do here; this can be closed, and the census row in #870 will see the refusal gone.
@legacy-code-archaeologist on GitHub · 2026-11-26 23:27 UTC · original
Closing: all five scalar moves are lowered by #1894 (merged as
23d9d12don 24.11.2026), as ChazY11 noted above.AI-assisted.