shader: test qword decrement borrow below limit #1113
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1120"
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 lambirou on 2026-11-24T01:20:50Z.
Change
This is now a test-only contribution after #948 merged the qword counter implementation.
It adds one focused case to the existing private LDS qword fixture:
lds_dec_borrowwrites0x40000001_00000000at byte offset 8 of the 16-byte record anduses
0x80000000_00000000as the limit.ds_dec_u64must borrow into the low dword and produce
0x40000000_ffffffff.docs/experiments.mdrecords the case and the expected pair.No
tools/or implementation file is changed.Verification
ctest --preset dev --no-tests=error -R '^compute_store_aot_lds_qword_warp$' -V0 mismatches. The borrow mutant is detected at word 1.
python -B tests/compute_store_check.py binary <llvm-mc> <llvm-objcopy> <libLLVM-23>local toolchain because LLVM 15 is not installed here.
docs_links_check.py:Self-test passed.,Checked 15 Markdown files and 256 links..git diff --check origin/main...HEAD: clean.the earlier hardware run on RX 9060 XT passed the same borrow fixture at
3050425).Evidence and follow-up
shader/ds-inc-dec-u64, headc42b1ef(maintainer merge of main and focused testcleanup). The implementation commit from the earlier PR revision was dropped; the branch is
test-only on top of the merged #944/#948 work.
(opcodes 0x63/0x64): decrement is unsigned and clamps at zero or above the limit; a below-limit
pair with a zero low word requires the borrow.
expression changes, the mutant replacement
- uint(must be updated.Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T01:58:54Z.
Review: COMMENTED
Reviewed commit
30504257d4d7586fdcbc9abcc0a879ed9187b6afon Linux x86_64 (Python 3.14.8, LLVM 19; Windows MSVC/WARP/LLVM-15 execution relies on CI).Checks run:
python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so-> exit 0python3 -B tests/gpu_report_format_check.py-> 10/10 OKDiff notes:
tools/compute_store_aot.py:unsigned_qword_compareandqword_is_zeromatch RDNA 2 ISA 70648 §12.13 fords_inc_u64/ds_dec_u64and their_rtnforms, with carry/borrow handled on the high word.tests/compute_store_check.py: the addedlds_dec_borrowcase (0x40000001_00000000under0x80000000_00000000),qword_counter_mutants, and updatedlds_controlsnegative check are consistent and clean;docs/experiments.mdis updated and title-neutral.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T01:35:15Z.
All four increment/decrement forms in this PR overlap the older #948, which also adds the conditional exchange. I’m keeping #948 at the front of the queue and preserving both authors’ evidence. The independent RX 9060 XT results and the strictly-below-limit, zero-low-word decrement case you identified are useful here. Please keep this PR open while #948’s refreshed CI runs. Its remaining delta can become a focused test contribution if it adds coverage.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T01:45:28Z.
Added the focused test-only follow-up 3050425: a strictly-below-limit, zero-low-word decrement (0x40000001_00000000 against limit 0x80000000_00000000) must borrow to 0x40000000_ffffffff; the borrow mutant is detected at word 1. WARP and RX 9060 XT both pass the qword test, binary exit 0. Keeping #1120 open while #948 CI runs, per review; if #948 lands this remains the test delta.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T02:06:35Z.
#948 has merged at
619ef878. Your below-limit decrement/borrow control is distinct and is worth keeping. Please bring #1120 onto that commit and keep the test-only delta and its AMD/WARP evidence. The existing implementation and conditional exchange can remain from #948. #954 also touches the shared test file, so I will verify the combined diff before merging.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T02:33:37Z.
Rebased onto main
f05369ecafter #948 merged and dropped the implementation commit. #1120 is now test-only: the lds_dec_borrow case (strictly below limit, zero low word, result 0x40000000_ffffffff) plus its borrow mutant and docs. WARP qword passes with #948 at 320 words and the mutant at word 1; no tools/ change remains.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T03:19:58Z.
Adopted
c42b1ef. The branch is reset to the maintainer merge; the focused cleanup removed the stale expected-returns/base assertions and leaves only the lds_dec_borrow case and mutant on top of #948. No force push needed.