shader: lower vector shifts and subtracts in the compute store profile #1111
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1118"
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 tedin7 on 2026-11-24T01:17:50Z.
Change
Lowers four more unsigned vector ALU operations in the compute store profile:
v_lshlrev_b32_e32on a known word that is not a dispatch index (a shifted index stays a byte offset),v_ashrrev_i32_e32(arithmetic),v_sub_nc_u32_e32andv_subrev_nc_u32_e32. Refs #721. Separate code from #1083 and #1090; it touches the same ALU table and regex, so one of them may need a rebase.This change was AI-assisted.
Verification
python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: exit 0 (LLVM 19 locally; CI uses LLVM 15).Unverified dispatch byte offsetat the new fixture.read_shift_subfixture is added to thedraw-guard-readWindows entry. I have no WARP adapter here, so the readback itself runs only in CI. Locally I evaluated the generated HLSL expression for 150 lanes and compared it with the independent CPU reference: 0 mismatches.Evidence and follow-up
Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T01:18:00Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
4a2740dℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T01:35:26Z.
AI-assisted. Merged origin/main to resolve conflicts in the compute store lowerer, its test and docs/experiments.md. Both sets of VOP2 operations are kept: the add, or, xor and max case from main and the shift and subtract case from this branch, each with its own CPU reference and negative controls. v_ashrrev_i32 moves from the rejected list to the supported list. tests/compute_store_check.py passes locally with LLVM 19.