shader: test qword decrement borrow below limit #1120
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1120
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1120/head"
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?
@lambirou on GitHub · 2026-11-24 01:20 UTC · original
lambirou:shader/ds-inc-dec-u64→main· +28 −0 · 2 files · 3 commits · merged 2026-11-24 03:35 UTCChange
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
@R0Y00 on GitHub · 2026-11-24 01:35 UTC · original
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.
@lambirou on GitHub · 2026-11-24 01:45 UTC · original
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.
@R0Y00 on GitHub · 2026-11-24 02:06 UTC · original
#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.@lambirou on GitHub · 2026-11-24 02:33 UTC · original
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.@lambirou on GitHub · 2026-11-24 03:19 UTC · original
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.@tedin7 on GitHub · 2026-11-24 01:58 UTC · original · reviewed
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.