cpp-migration: lower v_mad_u64_u32 and v_mad_i64_i32 in the direct C++ compute path #3000
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#3000
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 03:59 UTC · original
Target branch
cpp-migration. Part of #2935 (instruction coverage: integer ALU). I am taking this; please say if you already have it locally and I will drop it.Gap: the direct compute path refuses
v_mad_u64_u32andv_mad_i64_i32withdirect DXIL lowering for <name>. I found this with the same per-opcode VOP3 probe as #2985, oncpp-migration05438d65.gfx2hlsl.pylowers both (mad64): D = S0 * S1 + S2 modulo 2^64, with two 32-bit factors and a 64-bit S2. The unsigned form also writes the carry-out of the 64-bit add to a lane mask (VCC or an SGPR). The signed carry-out is not established, so the signed form is accepted only with the discarding null destination.Plan:
write_ballotpath of the carry instructions.v_mad_i64_i32with any SDST other thannull, and refuse modifiers.AI-assisted.