shader: cover six scalar carry, borrow and 64-bit select lowerings #689
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/695"
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 Leyukaka on 2026-11-22T20:46:14Z.
Change
This closes six coverage gaps in the scalar carry, borrow and 64-bit select lowerings of
tools/pixel_aot.py. Each was a one-line mutation that passed every WARP test onmain. Onlytests/pixel_aot_check.pychanges (32 added lines); the translator does not.s_sub_u32/s_subb_u32on(0x0002000000000000, 0x0001000000000001): the high words differ only above bit 15s_addc_u32 s45, s45, 0xffffffffwith carry in set: once where the first addition wraps (high_a = 1), once where only the incoming carry does (high_a = 0)s_cselect_b32afters_cselect_b64 s[48:49], 0, -1selects the zero pairs_cselect_b64with an immediate source rewriting SCC from the selected values_cselect_b64does not write SCC, so SCC must still be the result of the earlier compare.Not covered:
s_cselect_b64with a 32-bit hex literal source. The translator zero-extends it. I have not checked that against hardware, so this PR does not fix that behavior in a test (as in #683 and #687).Verification
On
2b03359(branch on3b9bb1a), Windows 11 build 26300.9974, MSVC 14.44.35207, Python 3.14, WARP:All 297 tests pass.
Each mutation was applied to
tools/pixel_aot.pyone at a time, and all WARP tests were run. Onmain, all of them passed for each mutation. A control that dropped the second wrap from thes_addc_u32carry was caught bypixel_aot_predicate_rounding_warp, so the run does detect a broken translator. On this branch, five mutations failpixel_aot_predicate_rounding_warpand the select one failspixel_aot_blend_scalar_warp.#688 also edits the
s_cselect_b64match, so one of the two may need a rebase.Checklist
AI-assisted.