shader: lower s_bitcmp0_b32 and s_bitcmp1_b32 in gfx2hlsl (Part of #1723) #2017
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2024"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T23:26:50Z.
Part of #1723
What this unblocks: Run 20 census #1 (128/114 pairs).
Lowers
s_bitcmp1_b32ands_bitcmp0_b32(SOPC) intools/startup/gfx2hlsl.py: SCC is set to the tested bit of S0, selected by S1[4:0], being 1 or 0. Nothing else is written.Verification:
python3 -B tests/startup_gfx2hlsl_s_bitcmp_check.pyon the branch:s_bitcmp: ok(216 cases: 6 words x 9 bit indexes x immediate and register forms x both ops, including indexes above 31).origin/mainsources:216 mismatches(every case refused asUnsupported).startup_gfx2hlsl_swap_check.py,startup_gfx2hlsl_sdwa_check.py,startup_gfx2hlsl_operand_count_check.py,startup_gfx2hlsl_op_refusals_check.py.startup_gfx2hlsl_s_bitcmp.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:30:46Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
7ea4990831ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:27:00Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
7ea4990ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T23:43:11Z.
I pushed a maintainer follow-up for the existing lane-mask finding. It reuses the integer word mask guard, checks direct EXEC/VCC and mask-tagged SGPRs in both operand positions, and documents the CPU-only test. On Windows the 216 scalar cases and 10 refusal controls passed, along with five existing translator checks and docs links. Full-mask SCC remains outside this patch.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:30:46Z.
Code review location:
tools/startup/gfx2hlsl.py; line 1755When a source is
exec_lo,vcc_lo, or an SGPR tracked inself.masks,self.u()returns the current lane's projected 0/1 bit rather than the full 32-bit mask. For a fully active wave,s_bitcmp1_b32 exec_lo, 1should set SCC, but the emitted expression evaluates to false because the generatedexecstarts at 1; copying EXEC to an SGPR has the same problem. A subsequent SCC branch or scalar select therefore takes the wrong path, whereas this program was previously refused. Reject lane-mask sources, as the existing word-level scalar handlers do, unless their full mask value can be modeled.Useful? React with 👍 / 👎.