Repository navigation
Conversation
The positive case for the SDWA v_movrel* forms only asserted that dpp_soff and dpp_doff appear in the generated text, so a lowering that dropped its sdwa_source or sdwa_dest call still passed while the raw word flowed into the destination write.
tedin7
left a comment
There was a problem hiding this comment.
Review of head 2ba4310 (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)- Win2025 (
--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. - GitHub CI on this head: Windows build, Linux checks and gfx1013 fixtures pass.
Mutations (both reverted with git checkout -- .):
- tools/pixel_aot.py: drop the
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. - tools/pixel_aot.py: drop the
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.
|
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. |
|
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. |
Closing:
|
mutant in tools/pixel_aot.py |
main result |
|---|---|
sdwa_source(...) dropped from the movrel path |
caught |
sdwa_dest(...) dropped at the v_movrels site (line 5533) |
caught |
sdwa_dest(...) dropped at the v_movreld site (line 5542) |
caught |
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:
assert "(((asuint(dpp_src27) >> 24u) & 0xffu)" in sdwa_hlsl
assert "((asuint(alu30) & 0xffff0000u) | ((dpp_val37 & 0xffffu) << 0u))" in sdwa_hlsl
assert "asuint(asint(asuint(alu34) << 8u) >> 24u)" in sdwa_hlslstartup_image_sample_a16_check.py-style regex tables such as SDWA_MOVREL_PINS are the better form: they survive register renumbering, and the
count field catches a lowering that applies the selection in one arm and not the other.
Thanks for landing it.
Notes
- AI-assisted; closing my own PR after checking the replacement rather than assuming it was equivalent.
What
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