mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #805] wave64_halves: recognize UVOTE under non-zero EXEC and boolean UVOTE combinations (SHADER-10) #843
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#843
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/805
Author: @madhyn
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/shader10-uvote-nonzero-combine📝 Commits (2)
d77ce93wave64_halves: recognize UVOTE under non-zero EXEC and boolean UVOTE combinations (SHADER-10)62e5472wave64_halves: restore EXEC launch mask across s_wqm_b64 + s_and_b64📊 Changes
2 files changed (+82 additions, -17 deletions)
View changed files
📝
tests/semantic/test_wave64_halves.py(+32 -0)📝
tools/wave64_halves.py(+50 -17)📄 Description
What and why
In
tools/wave64_halves.py, several wave-uniform compare/branch idioms in the retail 1.0.2.1 graphics corpus were conservatively marked Tier C (tainted-branch):s_cbranch_execz/s_cbranch_execnz(st["nz"]): when a block narrowsEXECand immediately skips empty halves withs_cbranch_execz(or enters the non-empty edge vias_cbranch_execnz), every 32-lane half reaching the non-zero edge hasEXEC != 0. A subsequent uniformv_cmp_*(all scalar/immediate non-tainted operands) ANDed withEXECproduces the exact same branch decision in each reaching half as in the full 64-lane wave.n=1: disassemblies often printv_cmp_*_e64 sN, ...with a single-register operand (n=1), whereas wave64v_cmpwrites the 64-bit pairs[N:N+1]. PropagateUVOTEand taint tos[N+1]as well sos_and_b64 vcc, exec, s[N:N+1]seesUVOTEon both halves of the pair.UVOTEcombinations:s_cselect_b64 dst, exec, 0(or0, exec) from an untaintedSCCunder launch/non-zeroEXEC, ands_and_b64/s_or_b64combiningUVOTEmasks (e.g., two uniform compares combined befores_and_b64 vcc, exec, ...), preserveUVOTE.Testing
tests/semantic/test_wave64_halves.py:test_a_uvote_under_nonzero_exectest_c_uvote_under_narrowed_exec_without_execz_guard(negative control: withouts_cbranch_execz, stays Tier C)test_a_uvote_and_or_combinetest_a_uvote_cselect_from_uniform_sccpython3 -m unittest tests/semantic/test_wave64_halves*.py tests/test_w64_graphics*.py: 190/190 passed.wave64_graphics_reasons == ['tainted-branch']: 276 shaders moved out of Tier C (11 Tier A, 265 Tier B).AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.