shader: lower s_cmov_b32, s_cmov_b64 and s_cmovk_i32 in the direct compute path #3070
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#3070
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?
@legacy-code-archaeologist on GitHub · 2026-11-27 14:04 UTC · original
Part of #2935 (closing the remaining
gfx2hlsl.pygaps in the direct C++ compute path).src/gfx1013_direct_compute.inldoes not yet lower scalar conditional movess_cmov_b32,s_cmov_b64ands_cmovk_i32(they fall through todirect ALU operand modifiers/unsupported wave64 scalar operation).Scope:
s_cmov_b32,s_cmov_b64(SOP1) ands_cmovk_i32(SOPK) in the direct compute path matchingtools/startup/gfx2hlsl.py(scalar_cmov):D = SCC ? S0 : D, leavingSCCunchanged.s_cmov_b32/s_cmovk_i32: general SGPR (s0..s105),vcc_lo(106), or wave32vcc_hi(107) destination;s_cmovk_i32sign-extends the 16-bit immediate.s_cmov_b64: aligned SGPR pair (s0..s104even) orvcc(106) destination; aligned SGPR pair, inline integer (-16..64), or 32-bit literalS0.operand32so a symbolic descriptor destination is refused.uses_scc_after()(reads_scc) for all three instructions andtransfer()insrc/gfx1013_compute_native.cppfors_cmovk_i32.tests/native_salu_cmov_check.py,tests/cmake/native_salu_cmov.cmake) anddocs/experiments/native-direct-salu-cmov.md.I am taking it. AI-assisted.