Repository navigation
Conversation
lukaslw-lab
reviewed
Nov 30, 2026
lukaslw-lab
left a comment
Contributor
There was a problem hiding this comment.
Reviewed 18434d7c by reading the diff; not built or run.
Verdict: comment. I found no defect in the four proofs, but none of the new accept/refuse controls has run yet. No MUST.
- SHOULD (before approval): the
late-gapsmodes ran nowhere at this head. In run 46289500579, the gfx1013 job runssgpr_spill_check.pyonly asbinaryand does not rundpp_quad_broadcast_check.py. The Linux job runssgpr_spill_check.pywith no arguments, and the Windows job registers no*_late_gapstest (nollvm-mcfound). So the three widened shapes have no executed test and no mutation. One local run with LLVM 15llvm-mc, pasted here, would settle it. - Self-move of EXEC:
writes_execchecks destinations, so only the exacts_mov_b64 exec, exec/s_mov_b32 exec_lo, exec_lowithout modifiers leaves the writer list (gfx2hlsl.py:4989). The early return in_loweris pixel-only and comes after the fetch-call check. - Lane alias proof:
spill_operandsrefuses register lanes (:9556), so no write to an unknown slot can slip in.last_write[lane & 31] == laneat each read means wave32 and wave64 read the same write. Pairs still refuse with branches (quad_flow_straight) or with no observed reload. - Vector reuse: refused unless the first ordinary use is
v_mov_b32 v<n>, <non-VGPR>with no modifiers, no instruction in the program writes EXEC, and no lane op follows. Vertex, compute and mesh keep the old refusal (self.kind != 'ps'). - Pixel descriptor spill: limited to the entry block, a table symbol that names one value, and the unchanged
formatted_descriptor_from_block.provencomes fromspill_word_provenas in compute. #3486 does not change the block proof, so the two PRs do not interact here.
Tests: CI ran only sgpr_spill_check.py in its old modes (no arguments, binary), both ok. Neither reaches the new lines, since every new control lives in late-gaps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #3478 (items 1 and 2).
What changes
tools/startup/gfx2hlsl.py:v_subrev_f32_dpp: no new lowering. The existing table entry and the DPP pair/broadcast path already giveF(v2) - F(v256)(SRC1 minus the permuted SRC0). What refused these shaders was as_mov_b64 exec, exec/s_mov_b32 exec_lo, exec_lobetween thes_wqmand the read. A move of EXEC to itself without modifiers is no longer counted as an EXEC writer byquad_flow_refusals, and in a pixel stage_lowerreturns before touching the EXEC/WQM state (the instruction writes neither EXEC nor SCC). The other users ofwrites_execare unchanged.v_writelane_b32, lanes k and k+32 of one VGPR: accepted in straight-line code when everyv_readlane_b32of the slot follows a last write to the same lane, and at least one such reload exists. Wave32 (slotk & 31) and wave64 (lanek) then read the same write. A read with no prior write, or after a write to the other lane, is still refused.v_mov_b32 vN, <SGPR or immediate>without modifiers, no instruction in the program writes EXEC, and no lane read or write follows.formatted_descriptor_from_blockproves its local table load. A copied word (s_mov_b32) is refused.The existing refusal messages and conditions remain for every shape outside these proofs.
Tests
Two new
late-gaps <llvm-mc>modes (startup_gfx2hlsl_dpp_quad_broadcast_check.py,startup_gfx2hlsl_sgpr_spill_check.py), registered intests/cmake/startup_gfx2hlsl_late_gaps.cmakewhenllvm-mcis found. They assemble the accept and refuse controls for each shape above.These two modes did not run on our host:
llvm-mcis not installed there, so CTest did not register them. The Linux CI job has LLVM 15 and should run them. Until it does, the new accept/refuse controls are unexecuted, and no mutation was run against them.Passed on our host (pure-Python modes, 0 FAIL): dpp_quad_broadcast, sgpr_spill, dpp_pair, dpp_quad_flow, dpp_quad_swap, spill_branches, compute_spill, compute_mask_spill, mesh57_lane_spill, mesh57_skeleton, mesh57_depth_only, mesh57_loop, mesh57_loop_refusal, gfx2hlsl_refusals, gfx2hlsl_op_refusals, triage_run, refusal_census. The 11 registered ctest entries for these passed.
Not covered
gfx2hlsl.py. They merge without conflict; the combined tree was not tested.