You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #870. tools/startup/gfx2hlsl.py lowers the 64-bit scalar complement logic ops (s_nor_b64, s_nand_b64, s_xnor_b64) and the 32-bit s_andn2_b32/s_orn2_b32, but not the 32-bit s_nor_b32, s_nand_b32 and s_xnor_b32. pixel_aot already 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 (current main):
Op
Instances
Programs
s_nor_b32
11
4
s_nand_b32
2
1
s_xnor_b32
0
0
s_xnor_b32 is 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.
A translator check against 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.
A refusal check stays in place for anything else unsupported.
An LLVM 15 round trip with llvm-mc and the C API decoder.
A negative control: a mutant that drops the complement must fail.
Opened as #1928: three SCA entries (~({0} & {1}), ~({0} | {1}), ~({0} ^ {1}), SCC result != 0) and SOP2 cases in tests/startup_gfx2hlsl_scalar_m0_check.py. Each entry is needed on its own — removing any one of them turns the check red.
@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 three SCA entries 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 — your encode_sop2 route in startup_gfx2hlsl_scalar_m0_check.py is a good cross-check if you want to run it against the branch.
PR: #1925. The three SCA entries match pixel_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 past s_nor_b32 and stop next at v_cmp_class_f32. @ChazY11, a cross-check with your encode_sop2 route would be welcome.
Opened as #1923: three SCA entries (~({0} & {1}), ~({0} | {1}), ~({0} ^ {1}), SCC result != 0) and SOP2 cases in tests/startup_gfx2hlsl_scalar_m0_check.py. Each entry is needed on its own — removing any one of them turns the check red.
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_sop2 route and report the result on #1925.
Activity
ChazY11 commentedon Nov 24, 2026
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 commentedon Nov 24, 2026
@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 commentedon Nov 24, 2026
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 commentedon Nov 24, 2026
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.startup: refuse lane-mask forms of the 32-bit complement ops in gfx2hlsl
ChazY11 commentedon Nov 24, 2026
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.startup: lower s_nand_b32, s_nor_b32 and s_xnor_b32 in gfx2hlsl