startup: lower s_cselect_b32 into vcc_lo and exec_lo in gfx2hlsl #2121
No reviewers
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!2121
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2121/head"
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?
@denn0x on GitHub · 2026-11-25 00:53 UTC · original
denn0x:startup/gfx2hlsl-cselect-lane-mask→main· +132 −4 · 6 files · 2 commits · merged 2026-11-25 01:25 UTCPart of #1723
In wave32,
vcc_loandexec_lohold the whole lane mask, and the generic scalar path intools/startup/gfx2hlsl.pyalready writes them asvccandexec.s_cselect_b32goes through a separate select path that assumed an SGPR destination, sos_cselect_b32 vcc_lo, -1, 0stopped the translation with aTypeErrorinstead of a lowering or anUnsupportedrefusal.Now:
vcc_loandexec_loget the lane's bit of the selected word; anexec_lowrite clearsexec_known.m0destinations are lowered as before.Unsupportedmessage.New test
tests/startup_gfx2hlsl_cselect_mask_check.py, registered asstartup_gfx2hlsl_cselect_mask_controlsinCMakeLists.txt,AGENTS.mdand the Python job, and described indocs/experiments.md. It decodes synthetic SOP2 words and evaluates the emitted select for both SCC values with the restricted evaluator ofstartup_gfx2hlsl_bit_alu_check.py. Negative control: the select with its& 1removed gives a differentvcc.Verification (branch head
3dc861e2onmain246a875d, Windows 11 Pro 10.0.26300, Python 3.13):python -B tests/startup_gfx2hlsl_cselect_mask_check.py-> exit 0 (cselect mask: vcc_lo and exec_lo are the lane mask; SGPR and m0 unchanged; null refused). Onmainthe same test fails withTypeError: 'NoneType' object is not subscriptable.tests/startup_gfx2hlsl_*_check.py,tests/startup_translator_check.py,tests/docs_links_check.pyandtests/startup_tools_lint_check.py tools/startup-> 33 scripts, all exit 0.git diff --check main..HEAD-> clean.AI-assisted.
@R0Y00 on GitHub · 2026-11-25 01:21 UTC · original
I merged main after #2116 and kept both this scalar select fixture and #2122's mask-overwrite fixture in Linux and CTest. The select, mask-overwrite, scalar arity and SOPK checks and docs links all pass together on Windows. The fixture evaluates emitted HLSL; this update does not add a GPU draw.