test: isolate readlane guarded refusal #1876
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1883"
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 JustinDCosta on 2026-11-24T20:04:21Z.
Follow-up to the merged #1858. The guarded
v_readlane_b32control previously rejected through a later use of its result, so it did not isolate the translator's guard check.This fixture now performs the readlane inside a guarded region, leaves its SGPR result unused, and stores an already-known VGPR while guarded. The normal translator refuses the instruction with the readlane diagnostic. A local mutation that removes only the
guard_spanrefusal accepted the fixture, confirming that the negative control directly detects this check.Validation:
compute_store_aot_readlane_(warp|hardware): 2/2 passed in both configurations.git diff --checkpassed.Refs #1543
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T20:15:07Z.
Review: COMMENTED
Peer review of head
f13a7a7b67d83e57e9bd81a46861723447836141.Result: no P1/P2 defects found. The new guarded case now isolates the readlane guard: it fails when that guard is removed, and it passes only for that reason.
The change (
tests/compute_store_check.py,readlane_controls) rebuilds the "readlane inside an exec-masked region" program so that nothing else in it can be refused. The guarded region now contains a validbuffer_store_dword v1, v0, s[8:11], 0 idxennext to thev_readlane_b32, and the later use of the readlane result and the final store are removed, so the program has no unused or dangling result. The expected diagnostic is unchanged (Unverified readlane operand or wave layout), andrejectsalready requires that exact text.tools/compute_store_aot.pythat can produce that diagnostic for this program isguard_span is not Nonein the readlane branch (around line 611).Linux checks run locally in a clean worktree at this head:
git diff --check origin/main...HEAD: cleantests/docs_links_check.py: passed (18 files, 376 links)tests/bidi_controls_check.py: passed (1326 files)tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: exit 0 (the two "Unsupported MUBUF cache invalidation" lines in its output are the check's own expected refusals)Mutations in
tools/compute_store_aot.py(local, each reverted withgit checkout -- .; tree clean):or guard_span is not Nonefrom the readlane condition. With the new test,compute_store_check.py binary ...exits 1 at the guarded case withAssertionError: Expected rejection: Unverified readlane operand or wave layout(the program is accepted, as it should not be). With the previous version of the test, the same mutation also exits 1, but only because the guarded program was then refused for another reason (Unverified ALU operand), so the old case did not isolate this guard.guard_span is None): the check exits 1 earlier, at the unguarded readlane baseline (Unverified readlane operand or wave layoutraised forREADLANE).I did not run the Windows build or the draw checks for this change.
AI-assisted; commands listed were executed locally.