pixel_aot: lower s_bfm_b32 #596
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#596
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?
@JB2WIN on GitHub · 2026-11-22 14:51 UTC · original
tools/pixel_aot.pydoes not yet lower the scalar bitfield-mask instructionss_bfm_b32ands_bfm_b64(SOP2, both indocs/coverage/gfx1013.tsv). #436 covers the vectorv_bfm_b32, not these.I'm taking this, unless someone has it in progress. Plan:
s_bfm_b32as((1u << (S0 & 31)) - 1u) << (S1 & 31), ands_bfm_b64likewise on 64 bits with 6-bit counts, written into an SGPR pair. Both go through the existing SALU table and helpers, next to the other SOP2 bit operations. They don't write SCC.S_BFM_B32for(shl (add (shl 1, a), -1), b)(SIInstructions.td,BFMPatterns). The 5-/6-bit count masking follows the usual SOP2 convention. I can't check it against the ISA PDF, so the tests and docs record it as an assumption.AI-assisted.
@JB2WIN on GitHub · 2026-11-22 15:02 UTC · original
Correction to the issue text:
s_bfm_b64is already lowered onmain(SALU_HELPERS["s_bfm_b64"], sinced8bf0c0). I missed it because my search only matched the b32 spelling. Onlys_bfm_b32is missing. The PR will cover just that and add a draw that checks it alongside the existing b64 lowering.This comment is AI-assisted.