shader: fold s_ff1_i32 of exec outside guarded regions #1896
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1903"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by henriazz10 on 2026-11-24T20:43:53Z.
Change
Refs #1543. This is the
s_ff1_i32_b64 sD, execands_ff1_i32_b32 sD, exec_loslice claimed in https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7142817082. It follows thes_bcnt1_i32_b32 sN, exec_lopattern and touches onlytools/compute_store_aot.py, its test,CMakeLists.txtanddocs/experiments.md.execis 0), so boths_ff1_i32_b64 sD, execands_ff1_i32_b32 sD, exec_lofold to the known scalar word0for any group size, preservingSCC.s_and_saveexec_b32up to theexecrestore);vcc,exec_hi, an SGPR, a literal, or a mismatched width);s106,s12, or an SGPR pairs[4:5]onb64).Verification
Commit
07c262a4, rebased ontof8f9bd7f(after #1904 merged; review nit fixed: blank line before the docs heading). The draws,controls()and the LLVM 15 round trip were re-run on07c262a4. Windows 11 build 26300, VS 2019 Build Tools 16.11 (MSVC 14.29), DXC 1.8.2502.11, Python 3.12, debug layer enabled.offscreen_checkwas built from an earliermain; this PR does not change it.compared_words=320 mismatches=0,debug_errors=0compared_words=320 mismatches=0,debug_errors=0The LLVM 15 round trip in Docker (
x2w-llvm15) exited 0:ff1_exec_binary()decodes the assembled fixture back to the sames_ff1_i32_b64ands_ff1_i32_b32lines and requires the same translation.Negative control. With
tools/compute_store_aot.pyreverted tomain,ff1_exec_controls()fails withValueError: Unsupported compute instruction: s_ff1_i32_b64 s4, exec.Evidence
The fixture is source-built in LLVM 15 spelling. It runs one group of 64 threads, storing
(tid.x << 8) + s4 + s5wheres4comes froms_ff1_i32_b64 s4, execands5froms_ff1_i32_b32 s5, exec_lo. All 320 words are compared against a Python reference.1: word 0;1in place of0for the foldeds_ff1result.Checklist
docs/experiments.md).AI-assisted. Gemini 4 Hydrogen (Antigravity CLI) wrote the change and ran the checks; Claude Code reviewed it.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T20:52:39Z.
Review: COMMENTED
Review of head
1ade038375Scope: C++ CMakeLists.txt (one new ctest entry), tools/compute_store_aot.py (s_ff1_i32 of exec folded to 0 outside guarded regions), tests/compute_store_check.py, docs/experiments.md. Tier D isolated shader ops. Author henriazz10.
Commands executed locally:
Mutation checks (logic in tools/compute_store_aot.py, reverted with git checkout -- .):
Findings: P1=0, P2=0. Nit: docs/experiments.md has no blank line before the new "#### First active lane of a full wave" heading.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T21:05:51Z.
Review: COMMENTED
Review of head
07c262a4f2Scope: CMakeLists.txt (one new ctest entry), tools/compute_store_aot.py (s_ff1_i32 of exec folded to 0 outside guarded regions), tests/compute_store_check.py, docs/experiments.md. Tier D isolated shader ops. Author henriazz10. Retest after the author updated the PR; the earlier review of head
1ade0383is superseded.Commands executed locally:
Mutation checks (logic in tools/compute_store_aot.py, reverted with git checkout -- .):
Findings: P1=0, P2=0.
AI-assisted; commands listed were executed locally.