startup: gfx2hlsl lacks the 32-bit scalar complement logic ops (s_nor_b32, s_nand_b32, s_xnor_b32) #1919
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#1919
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?
@MasterDomino on GitHub · 2026-11-24 21:13 UTC · original
Part of #870.
tools/startup/gfx2hlsl.pylowers the 64-bit scalar complement logic ops (s_nor_b64,s_nand_b64,s_xnor_b64) and the 32-bits_andn2_b32/s_orn2_b32, but not the 32-bits_nor_b32,s_nand_b32ands_xnor_b32.pixel_aotalready lowers all of them (#561), and the decoder prints them (#1078).Where it shows up. The 12 loading-path requests that #1915 unblocks now stop at
unsupported: s_nor_b32. Aggregate counts over the 117 distinct programs in one local shader cache (currentmain):s_nor_b32s_nand_b32s_xnor_b32s_xnor_b32is included so the 32-bit set matches the 64-bit one.Scope. Add the three ops to the scalar table with the same SCC rule as the existing logic ops: SCC = result != 0. Nothing else changes.
Acceptance.
pixel_aot's lowering, or an integer reference: each op over edge values (0, all ones, alternating bits, single bits), checking the result and SCC.llvm-mcand the C API decoder.I'd like to take this; PR to follow.
AI-assisted.
@ChazY11 on GitHub · 2026-11-24 21:22 UTC · original · edited 2026-11-24 21:31 UTC
Opened as #1928: three
SCAentries (~({0} & {1}),~({0} | {1}),~({0} ^ {1}), SCCresult != 0) and SOP2 cases intests/startup_gfx2hlsl_scalar_m0_check.py. Each entry is needed on its own — removing any one of them turns the check red.@MasterDomino on GitHub · 2026-11-24 21:24 UTC · original
@ChazY11 thanks for checking first. I opened this one with a claim in the description and already have a branch in progress (
startup/gfx2hlsl-sop2-complement-b32): the threeSCAentries plus an edge-value check of result and SCC, an LLVM 15 round trip and a fail-first control. PR should follow within the hour. I'll link it here, and I'd welcome your review on it — yourencode_sop2route instartup_gfx2hlsl_scalar_m0_check.pyis a good cross-check if you want to run it against the branch.AI-assisted.
@MasterDomino on GitHub · 2026-11-24 21:29 UTC · original
PR: #1925. The three
SCAentries matchpixel_aot's text; the new check covers 11 operand forms × 2,184 value pairs per op against an integer reference for result and SCC (SCC seeded so a missing write fails), the lane-mask forms against their and/or/xor siblings, every still-unlowered SOP2 op refused by name, and an LLVM 15 round trip (llvm-mc encode and C API decode, 90 forms). Complement-dropping and SCC-dropping mutants fail. Recount on current main (with #1915): the 12 loading requests move pasts_nor_b32and stop next atv_cmp_class_f32. @ChazY11, a cross-check with yourencode_sop2route would be welcome.AI-assisted.
@ChazY11 on GitHub · 2026-11-24 21:31 UTC · original
Opened as #1923: three
SCAentries (~({0} & {1}),~({0} | {1}),~({0} ^ {1}), SCCresult != 0) and SOP2 cases intests/startup_gfx2hlsl_scalar_m0_check.py. Each entry is needed on its own — removing any one of them turns the check red.@ChazY11 on GitHub · 2026-11-24 21:45 UTC · original
Withdrawing #1928: #1925 by @MasterDomino is the implementation and the issue description already said "I'd like to take this".
I read the body but missed that line, which is the same mistake I made with #1896 — the claim was in front of me and I did not
look for it before opening a branch.
I will instead do what they asked: run their branch through the
encode_sop2route and report the result on #1925.