Repository navigation
tests/semantic: NSA address lists are live-ins of read_before_write_vgprs and reg_reads_writes (TEST-NSA-VLIST-LIVENESS) - #894
Merged
ubiquitarianism merged 1 commit intoNov 24, 2026
Conversation
…gprs and reg_reads_writes (TEST-NSA-VLIST-LIVENESS) Both functions add the registers of an NSA address list (`regs += x["r"]` for a "vlist" operand), but no test reached it: with tools/semantic_mutants.py (ProjectLeonida#734), removing either line survived all twelve test files that name these functions, run together. test_store_liveins.py now checks an image_sample with [v2, v3], an image_load with the non-contiguous [v2, v5, v9] (a range from v2 would read v2..v4 and miss v5 and v9), and a list register written earlier (v5 is then no live-in). Both mutants now fail the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent verification on Windows 11, Python 3.14: |
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.
Claimed in the coordination issue as: TEST-NSA-VLIST-LIVENESS
What and why
read_before_write_vgprsandreg_reads_writesintools/rdna2spirv.pyadd the registers of an NSA address list (regs += x["r"]for avlistoperand, lines 16678 and 16939 onmain), but no test reached that line. Withtools/semantic_mutants.pyfrom #734, removing either line survived all twelve test files that name these functions, run together; everything else in the two functions was caught.tests/semantic/test_store_liveins.pynow checks:image_sample v0, [v2, v3], ...: reads{2, 3}, writes{0};image_load v[4:7], [v2, v5, v9], ...: reads the non-contiguous{2, 5, 9}(a range from v2 would read v2..v4 and miss v5 and v9), writes{4..7};v_mov_b32 v5, 0: only v2 and v9 are live-ins forread_before_write_vgprs.Test only, no translator change.
Tested
python -m unittest discover -s tests/semantic -p test_store_liveins.py: 4 tests OK.semantic_mutants --function read_before_write_vgprs/--function reg_reads_writeswith this file: the line-16678 and line-16939 removals now fail it (3 failures each).tests/test_semantic_translator_use.py,scripts/check_no_game_data.py: OK.Linux, CPU only; no GPU, no game files.
AI-assisted (Claude Code).
🤖 Generated with Claude Code