tooling: count accumulator destinations as reads in ps_input_scan #2529
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2537"
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 Asimmimx on 2026-11-25T20:16:57Z.
Summary
parse_instructionintools/startup/ps_input_scan.pynow keeps the destination among the source tokens for the forms that read it:v_mac_,v_fmac_,v_pk_fmac_,v_dot2c_,v_dot4c_,v_dot8c_andv_writelane_b32. Such a register counts as live-in when nothing wrote it before. Every other form still treats its destination as written only, and an accumulator that is written first stays out of the live-in set.Fixes #2536
Tests
Windows 11 26300, commit
f90804b7:Passes with "ps_input_scan checks passed". It reports "destination rule: 16 decoded-text cases" (13 existing plus 3 new) and the new "accumulator rule: 5 encoded forms read their destination". The end-to-end, reference, pixel-dir, container, capture and determinism sections are unchanged and pass.
New cases:
v_fmac_f32_e64 v2, v0, v1gives[0, 1, 2].v_writelane_b32 v2, s0, 1gives[2].v_mov_b32_e32 v2, 0followed byv_fmac_f32_e32 v2, v0, v1(accumulator written first) gives[0, 1].shader():v_mac_f32(0x1f),v_fmac_f32(0x2b),v_mac_legacy_f32(0x06),v_fmac_f16(0x36) andv_pk_fmac_f16(0x3c). Each gives live-in[0, 1, 2].Fail-first
With the tool reverted to
main, the check exits 1:Open
dst_unused:UNUSED_PRESERVEand DPP forms with partial row or bank masks also keep part of their destination. They are not handled.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T20:22:27Z.
Review: COMMENTED
Review of head
f90804b7(comment only, no merge decision beyond the merge rules).Looks sound.
parse_instructionkeeps the destination among the sources forv_mac_,v_fmac_,v_pk_fmac_,v_dot2c/4c/8c_andv_writelane_b32; every other form is unchanged. The new decoded-text and encoded-form cases guard this, including the "written first stays out of live-in" case.Commands run locally on a worktree of the head:
python3 -B tests/startup_ps_input_scan_check.py-> "ps_input_scan checks passed"python3 tests/docs_links_check.py-> passed (478 links)python3 tests/bidi_controls_check.py-> passedgit diff --check origin/main...HEAD-> cleanv_writelane_b32fromDESTINATION_READ_PREFIXES-> check fails withAssertionError: (['v_writelane_b32 v2, s0, 1'], [], [2]), as it should.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T20:26:36Z.
Win2025 WARP receipt for head
0f9251d5after updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
0f9251d54677baa33e4b791f7d257a40189a58cb:tests/startup_ps_input_scan_check.pyok (6.8s), exit 0.AI-assisted; commands listed were executed locally.