startup: lower the 32-bit scalar complement logic ops #1928
No reviewers
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!1928
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1928/head"
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?
@ChazY11 on GitHub · 2026-11-24 21:31 UTC · original
ChazY11:startup/scalar-complement-b32→main· +18 −0 · 2 files · 1 commits · closed without mergingImplements #1919.
Change
tools/startup/gfx2hlsl.py, three entries inSCA, with the shapes the 64-bit forms already use:Nothing else moves:
s_andn2_b32/s_orn2_b32/s_not_b32and every b64 form stay as they are.Tested
The new cases build SOP2 words from the decoder table (
s_nand_b320x18,s_nor_b320x1a,s_xnor_b320x1c) andtranslate them:
(I keep the assertion on the shape —
s28 = ~(plus the operator, and the exact SCC line — because this fixture's stagefolds
s5to a constant, which is not what the case is about.s_and_b32is asserted separately as the unchanged neighbour,with no complement.)
Fail-first
Removing one entry at a time from
SCA:so each of the three is needed on its own; the fixture does not pass because the neighbours happen to be present.
Scope
Two files:
+2lines in the translator table,+16in the existing scalar check. No new file, no CMake change, no draw mode.Notes
@ChazY11 on GitHub · 2026-11-24 21:45 UTC · original
Closing: #1925 by @MasterDomino is the implementation, and the issue description says "I'd like to take this; PR to follow" — I
claimed it without reading that line, exactly the mistake I made on #1820/#1896. My fault, not theirs.
Their branch also does more than mine: 11 operand forms × 2,184 value pairs against an integer reference for result and SCC,
the lane-mask forms against their and/or/xor siblings, refusals for every still-unlowered SOP2 op, and an LLVM 15 round trip.
Mine was three table entries and three SOP2 words — a cross-check at best, not an implementation.
What I will do instead: run their branch through the
encode_sop2route I proposed, as they asked, and report it on #1925. Ifthat route disagrees with theirs anywhere, that is worth knowing; if it agrees, an independent second path is still worth
recording.
Two corrections to my earlier comments here, so the thread is not misleading:
The PR number I quoted (#1923) does not exist; the branch was #1928, now closed.
"Each entry is needed on its own" still holds for my three lines, but that is a property of my fixture, not evidence about
theirs.
AI-assisted.
Pull request closed