test: pin the SDWA movrel source and destination selections #1966
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!1966
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1966/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?
@ChazY11 on GitHub · 2026-11-24 22:15 UTC · original
ChazY11:test/pin-sdwa-movrel-selections→main· +6 −0 · 1 files · 1 commits · closed without mergingWhat
The positive case for the SDWA
v_movrel*forms (#1934) asserted only that the output mentions the indexed words:That establishes the instruction is accepted and is not lowered as a quad read, but nothing about the two SDWA selections being
applied. Dropping either call keeps those names in the text:
With the source selection dropped the emitted line changes from
to
i.e. the raw word flows into the destination write — a wrong result, not a refused one.
Change
Three assertions on the existing positive case, one per selection shape it contains:
tests/pixel_aot_check.pyonly. No production change, no new file, no CMake change.Tested
Fail-first, both calls, each reverted afterwards:
tools/pixel_aot.pyswizzled = sdwa_source(...)→passswizzled = sdwa_dest(...)→passBefore this change both mutations left the check green; that is the gap it closes.
Notes
@R0Y00 on GitHub · 2026-11-24 22:29 UTC · original
Good catch on the missing assertions. Please retain the three masking/shift/sign-extension checks, but capture or normalize the generated temporary suffixes. These suffixes are instruction indices, so inserting an unrelated fixture instruction could otherwise fail the test. Tie each capture to the corresponding source or destination expression so the checks still fail when either SDWA step is removed. #1917 remains open for its planned draw/readback evidence.
@R0Y00 on GitHub · 2026-11-24 22:51 UTC · original
Thanks for finding the missing source/destination-selection coverage. #1979 credits your review and is now on main. It pins the same operations without the generated temporary numbers and catches the static and dynamic mutations. Closing this overlapping test patch. #1917 stays open for independently checking the native selection order.
@ChazY11 on GitHub · 2026-11-24 22:57 UTC · original
Closing:
mainnow pins the same three properties, and I verified it catches themSDWA_MOVREL_PINS/check_sdwa_movrel_pins()landed intests/pixel_aot_check.pywhile this PR was open, and it covers what this PR asserted —with occurrence counts, which is stricter than my presence checks. I re-ran my own mutants against
main36a9a06f:tools/pixel_aot.pymainresultsdwa_source(...)dropped from the movrel pathsdwa_dest(...)dropped at thev_movrelssite (line 5533)sdwa_dest(...)dropped at thev_movreldsite (line 5542)That is exactly the gap I opened this PR for, pinned three ways instead of one, so there is nothing left for it to add. Keeping it open would only create
a conflict with the newer table.
The three assertions I proposed, for the record, were:
startup_image_sample_a16_check.py-style regex tables such asSDWA_MOVREL_PINSare the better form: they survive register renumbering, and thecountfield catches a lowering that applies the selection in one arm and not the other.Thanks for landing it.
Notes
@tedin7 on GitHub · 2026-11-24 22:27 UTC · original · reviewed
Review of head
2ba43105b5(tests/pixel_aot_check.py only, +6 lines).Findings: P1 = 0, P2 = 0. Clean-room: test-only change, no new source or CMake edits.
Commands executed locally:
git merge-tree --write-tree --name-only origin/main HEAD: clean, no conflictspython3 -I tests/docs_links_check.py: PASSpython3 -I tests/bidi_controls_check.py: PASSgit diff --check origin/main...HEAD: PASSpython3 -I tests/pixel_aot_check.py(inline controls, no args): PASS (rc 0)--targets offscreen_check --regex pixel_aot_ --py-checks tests/pixel_aot_check.py): the py-check PASSED (rc 0), but CTest reported 2 failures out of 178 (pixel_aot_attribute_sampled_warpand_hardware, "whole_quad: unexpected result"). These tests are not touched by this PR. Only 1 of 2 phases completed, so Release /O2 was not verified on Win2025.Mutations (both reverted with
git checkout -- .):sdwa_source(...)call for SDWA movrel. Result:_check_controls_inlinefails at the new assert (line 16923). Killed. The old presence-only checks fordpp_soffanddpp_doffwould not catch it.sdwa_dest(...)call on the indexed destination. Result: the controls fail (rc 1). Killed.The pinned HLSL strings include SSA numbers (
dpp_src27,alu30), so they will need an update when the emitter's numbering changes. That is acceptable for a pin test.Not merged: the Win2025 Debug run shows 2 unrelated CTest failures and the Release /O2 phase did not complete. Happy to re-run once the node result is clean.
AI-assisted; commands listed were executed locally.
Pull request closed