shader: extend v_readfirstlane_b32 lowering to branched control flow in gfx2hlsl (Part of #1723) #2060

Closed
github-bot wants to merge 4 commits from gh-pr/2060/head into gh-pr/2060/base
Owner

@⁠tedin7 on GitHub · 2026-11-24 23:46 UTC · original
tedin7:x2w-r22-readfirstlane-branch → main · +165 −5 · 4 files · 4 commits · closed without merging

Part of #1723

What this unblocks: 719 draw refusals (v_readfirstlane_b32 with branches).

v_readfirstlane_b32 was refused in any shader that has a branch. Now a source is proven uniform inside one basic block, even when the shader has branches elsewhere.

  • The VGPR uniformity set is cleared at every block start (branch targets and the instruction after a terminator), so no proof crosses a join or a loop edge.
  • Proofs are refused in a branched shader if any instruction writes exec (exec/exec_lo/exec_hi, *saveexec*, v_cmpx*), so exec_known holds on every path.
  • Scalar sources that can carry a per-lane value (compare results, anything derived from exec/vcc) are found over the whole program, so a loop cannot bring a late mask write back to an earlier read.
  • Shaders without branches behave as before.

Tests:

  • new tests/startup_readfirstlane_branch_check.py, registered as startup_readfirstlane_branch in CMakeLists.txt. It fails on origin/main and passes here. It also checks that a join between the proof and the read, and an exec write, are still refused.
  • tests/startup_gfx2hlsl_readfirstlane_uniform_check.py: the "branch after read" case moved from refused to accepted, which is the intended change.

Verification: (local Linux run; Win2025 not run, this is a Python-only change)

  • python3 -B tests/startup_readfirstlane_branch_check.py: passes; the same file against the previous gfx2hlsl.py raises v_readfirstlane_b32 requires a proven uniform source.
  • python3 -B tests/startup_gfx2hlsl_*_check.py, tests/startup_uniform_lane_check.py, tests/startup_ngg_slice_check.py: all pass.
  • The remaining tests/startup_*_check.py need Windows probe binaries or arguments and were not run.
  • The 719 count comes from the task brief; I did not re-run the shader scan.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-24 23:46 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060) `tedin7:x2w-r22-readfirstlane-branch` → `main` · +165 −5 · 4 files · 4 commits · closed without merging Part of #1723 What this unblocks: 719 draw refusals (v_readfirstlane_b32 with branches). `v_readfirstlane_b32` was refused in any shader that has a branch. Now a source is proven uniform inside one basic block, even when the shader has branches elsewhere. - The VGPR uniformity set is cleared at every block start (branch targets and the instruction after a terminator), so no proof crosses a join or a loop edge. - Proofs are refused in a branched shader if any instruction writes exec (`exec`/`exec_lo`/`exec_hi`, `*saveexec*`, `v_cmpx*`), so `exec_known` holds on every path. - Scalar sources that can carry a per-lane value (compare results, anything derived from exec/vcc) are found over the whole program, so a loop cannot bring a late mask write back to an earlier read. - Shaders without branches behave as before. Tests: - new `tests/startup_readfirstlane_branch_check.py`, registered as `startup_readfirstlane_branch` in `CMakeLists.txt`. It fails on `origin/main` and passes here. It also checks that a join between the proof and the read, and an exec write, are still refused. - `tests/startup_gfx2hlsl_readfirstlane_uniform_check.py`: the "branch after read" case moved from refused to accepted, which is the intended change. Verification: (local Linux run; Win2025 not run, this is a Python-only change) - `python3 -B tests/startup_readfirstlane_branch_check.py`: passes; the same file against the previous `gfx2hlsl.py` raises `v_readfirstlane_b32 requires a proven uniform source`. - `python3 -B tests/startup_gfx2hlsl_*_check.py`, `tests/startup_uniform_lane_check.py`, `tests/startup_ngg_slice_check.py`: all pass. - The remaining `tests/startup_*_check.py` need Windows probe binaries or arguments and were not run. - The 719 count comes from the task brief; I did not re-run the shader scan. AI-assisted; commands listed were executed locally.
Part of #1723. VGPR uniformity is proven per basic block and cleared at every join; refused when any instruction writes exec; scalar sources that can carry a lane mask are excluded program-wide.
A scalar register written in a later block is only a proven source in a block that redefines it; the value recorded from the last visited arm no longer leaks into the join. Adds the two-arm negative control and a same-block redefinition positive.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:53:15 +00:00
github-bot closed this pull request 2026-11-26 23:53:15 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 23:46 UTC · original · edited 2026-11-24 23:54 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T23:54:22.048998Z 0cf2155 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 23:46 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#issuecomment-7147778986) · edited 2026-11-24 23:54 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"0cf21551f9121202409ebcbd2cf108a607ce1596","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T23:54:22.048998Z">2026-11-24T23:54:22.048998Z</relative-time> | `0cf2155` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 23:54 UTC · original

P1 Badge Reject implicit WREXEC writes in the branch safety scan

If a later block executes s_andn2_wrexec_b32 or s_andn2_wrexec_b64 and branches back to an earlier producer/read block, this check still leaves proof_ok=True: these instructions write EXEC implicitly, but their destination is an SGPR and their names match none of these checks. The existing WREXEC handler sets exec_known=False, but only after the earlier block has already been proven and emitted without predication. Consequently, the newly accepted shader can execute that block under a changed mask despite its entry-mask assumptions. Include both supported WREXEC forms in the global EXEC-write check.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 23:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#discussion_r4688234693) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Reject implicit WREXEC writes in the branch safety scan** If a later block executes `s_andn2_wrexec_b32` or `s_andn2_wrexec_b64` and branches back to an earlier producer/read block, this check still leaves `proof_ok=True`: these instructions write EXEC implicitly, but their destination is an SGPR and their names match none of these checks. The existing WREXEC handler sets `exec_known=False`, but only after the earlier block has already been proven and emitted without predication. Consequently, the newly accepted shader can execute that block under a changed mask despite its entry-mask assumptions. Include both supported WREXEC forms in the global EXEC-write check. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 23:54 UTC · original

P1 Badge Track implicit SCC dependencies across backward edges

When a later compare block branches back to an earlier s_cselect_b32 s2, 1, 0 followed by a VGPR copy and first-lane read, the select's implicit SCC dependency is absent from this fixed point. For example, v_cmp_lt_f32 into vcc_lo followed by s_cmp_eq_u32 vcc_lo, 0 makes the emitted HLSL SCC lane-dependent, yet tainted_s remains empty and scc_uniform is still initially true when the earlier block is translated. A synthetic machine-code fixture therefore newly accepts s9 = v7 even though its source varies between invocations at execution time. Include SCC producers and consumers in the whole-program proof, or conservatively refuse these reads.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 23:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#discussion_r4688234701) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Track implicit SCC dependencies across backward edges** When a later compare block branches back to an earlier `s_cselect_b32 s2, 1, 0` followed by a VGPR copy and first-lane read, the select's implicit SCC dependency is absent from this fixed point. For example, `v_cmp_lt_f32` into `vcc_lo` followed by `s_cmp_eq_u32 vcc_lo, 0` makes the emitted HLSL SCC lane-dependent, yet `tainted_s` remains empty and `scc_uniform` is still initially true when the earlier block is translated. A synthetic machine-code fixture therefore newly accepts `s9 = v7` even though its source varies between invocations at execution time. Include SCC producers and consumers in the whole-program proof, or conservatively refuse these reads. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 23:54 UTC · original

P1 Badge Include m0 in the whole-program scalar taint analysis

When a later block copies a lane mask through m0 into an SGPR and then jumps back to an earlier producer/read block, this source list fails to taint the SGPR. reg_range('m0') also returns None, so v_cmp into vcc_lo, followed by s_mov_b32 m0, vcc_lo and s_mov_b32 s2, m0, leaves tainted_s empty. An earlier v_mov_b32 v7, s2 followed by v_readfirstlane_b32 s9, v7 is consequently accepted, although s2 is lane-dependent in the emitted HLSL when that block executes. Treat m0 conservatively as non-uniform, as uniform_source() already does, or track its dependencies globally.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 23:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#discussion_r4688234715) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Include m0 in the whole-program scalar taint analysis** When a later block copies a lane mask through `m0` into an SGPR and then jumps back to an earlier producer/read block, this source list fails to taint the SGPR. `reg_range('m0')` also returns `None`, so `v_cmp` into `vcc_lo`, followed by `s_mov_b32 m0, vcc_lo` and `s_mov_b32 s2, m0`, leaves `tainted_s` empty. An earlier `v_mov_b32 v7, s2` followed by `v_readfirstlane_b32 s9, v7` is consequently accepted, although `s2` is lane-dependent in the emitted HLSL when that block executes. Treat `m0` conservatively as non-uniform, as `uniform_source()` already does, or track its dependencies globally. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 23:54 UTC · original

P1 Badge Update the documented branch restriction for first-lane reads

This change admits shaders containing branches, but docs/experiments.md:11646 still explicitly states that the read requires “a branch-free program”; neither that section nor the README is updated. This leaves the published support boundary incorrect. Update the capability description with the new block-local proof and EXEC restrictions and document the new branch fixture's reproduction command. AGENTS.md explicitly requires a README or experiments update whenever a public capability changes.

AGENTS.md reference: AGENTS.md:L211-L212

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 23:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#discussion_r4688234726) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Update the documented branch restriction for first-lane reads** This change admits shaders containing branches, but `docs/experiments.md:11646` still explicitly states that the read requires “a branch-free program”; neither that section nor the README is updated. This leaves the published support boundary incorrect. Update the capability description with the new block-local proof and EXEC restrictions and document the new branch fixture's reproduction command. `AGENTS.md` explicitly requires a README or experiments update whenever a public capability changes. AGENTS.md reference: [AGENTS.md:L211-L212](https://github.com/R0Y00/Xbox2Windows/blob/0cf21551f9121202409ebcbd2cf108a607ce1596/AGENTS.md#L211-L212) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 01:00 UTC · original

Fixed in 454fd640 (rebased on main; push pending): WREXEC (s_andn2_wrexec_b32/b64) now disables the proof program-wide. Tests extended in tests/startup_readfirstlane_branch_check.py. AI-assisted; commands listed were executed locally: python3 tests/startup_readfirstlane_branch_check.py, startup_gfx2hlsl_readfirstlane_uniform_check.py, startup_gfx2hlsl_mad_check.py.

**@⁠tedin7** on GitHub · 2026-11-25 01:00 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#discussion_r4688755307) Fixed in 454fd640 (rebased on main; push pending): WREXEC (s_andn2_wrexec_b32/b64) now disables the proof program-wide. Tests extended in tests/startup_readfirstlane_branch_check.py. AI-assisted; commands listed were executed locally: python3 tests/startup_readfirstlane_branch_check.py, startup_gfx2hlsl_readfirstlane_uniform_check.py, startup_gfx2hlsl_mad_check.py.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 01:01 UTC · original

Fixed in 454fd640 (rebased on main; push pending): a per-lane SCC (compare fed by vcc/exec/tainted regs) now taints s_cselect/s_cmov/s_addc/s_subb destinations across backward edges. Tests extended in tests/startup_readfirstlane_branch_check.py. AI-assisted; commands listed were executed locally: python3 tests/startup_readfirstlane_branch_check.py, startup_gfx2hlsl_readfirstlane_uniform_check.py, startup_gfx2hlsl_mad_check.py.

**@⁠tedin7** on GitHub · 2026-11-25 01:01 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#discussion_r4688755489) Fixed in 454fd640 (rebased on main; push pending): a per-lane SCC (compare fed by vcc/exec/tainted regs) now taints s_cselect/s_cmov/s_addc/s_subb destinations across backward edges. Tests extended in tests/startup_readfirstlane_branch_check.py. AI-assisted; commands listed were executed locally: python3 tests/startup_readfirstlane_branch_check.py, startup_gfx2hlsl_readfirstlane_uniform_check.py, startup_gfx2hlsl_mad_check.py.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 01:01 UTC · original

Fixed in 454fd640 (rebased on main; push pending): m0 is now tracked as a tainted scalar in the whole-program scan. Tests extended in tests/startup_readfirstlane_branch_check.py. AI-assisted; commands listed were executed locally: python3 tests/startup_readfirstlane_branch_check.py, startup_gfx2hlsl_readfirstlane_uniform_check.py, startup_gfx2hlsl_mad_check.py.

**@⁠tedin7** on GitHub · 2026-11-25 01:01 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#discussion_r4688755700) Fixed in 454fd640 (rebased on main; push pending): m0 is now tracked as a tainted scalar in the whole-program scan. Tests extended in tests/startup_readfirstlane_branch_check.py. AI-assisted; commands listed were executed locally: python3 tests/startup_readfirstlane_branch_check.py, startup_gfx2hlsl_readfirstlane_uniform_check.py, startup_gfx2hlsl_mad_check.py.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 01:01 UTC · original

Fixed in 454fd640 (rebased on main; push pending): docs/experiments.md now describes the block-local proof, the exec restrictions and the new test command. Tests extended in tests/startup_readfirstlane_branch_check.py. AI-assisted; commands listed were executed locally: python3 tests/startup_readfirstlane_branch_check.py, startup_gfx2hlsl_readfirstlane_uniform_check.py, startup_gfx2hlsl_mad_check.py.

**@⁠tedin7** on GitHub · 2026-11-25 01:01 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#discussion_r4688755942) Fixed in 454fd640 (rebased on main; push pending): docs/experiments.md now describes the block-local proof, the exec restrictions and the new test command. Tests extended in tests/startup_readfirstlane_branch_check.py. AI-assisted; commands listed were executed locally: python3 tests/startup_readfirstlane_branch_check.py, startup_gfx2hlsl_readfirstlane_uniform_check.py, startup_gfx2hlsl_mad_check.py.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-25 03:47 UTC · original

Please keep the merged #2183 entry-block proof when updating this PR. Exercise one accepted case per rule, with #2060's taint and CFG checks covering later blocks. Keep both refusal sets, especially entry loops and varying sources after a join.

**@⁠R0Y00** on GitHub · 2026-11-25 03:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#issuecomment-7152241059) Please keep the merged #2183 entry-block proof when updating this PR. Exercise one accepted case per rule, with #2060's taint and CFG checks covering later blocks. Keep both refusal sets, especially entry loops and varying sources after a join.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 04:11 UTC · original

Thanks @⁠R0Y00. The branch is rebased and pushed as c346072cb90fae2009386d3e1561e7c5fa911c6f (mergeable).

Covered in this head:

  • The #2183 entry-block proof is kept.
  • The #2060 later-block taint and CFG checks are in place.
  • Each rule has one accepted case in tests/startup_readfirstlane_branch_check.py.
  • Both refusal sets are tested: loops in the entry block, and varying sources after a join.

Verification (Windows Server 2025, MSVC 14.44, D3D12 WARP, default 3-slot pool):

  • python3 x2w_pipe.py win2025 2060 --force --regex 'startup_readfirstlane_branch|startup_uniform_lane|startup_ngg_slice' --py-checks tests/startup_readfirstlane_branch_check.py
  • dev (ctest --preset dev): 3/3 passed
  • release (ctest --preset release): 3/3 passed
  • Python check tests/startup_readfirstlane_branch_check.py: ok

Note: the unfocused run failed because the generated command was too long for the Windows shell, so I ran the focused targets above.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 04:11 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#issuecomment-7152621729) Thanks @⁠R0Y00. The branch is rebased and pushed as `c346072cb90fae2009386d3e1561e7c5fa911c6f` (mergeable). Covered in this head: - The #2183 entry-block proof is kept. - The #2060 later-block taint and CFG checks are in place. - Each rule has one accepted case in `tests/startup_readfirstlane_branch_check.py`. - Both refusal sets are tested: loops in the entry block, and varying sources after a join. Verification (Windows Server 2025, MSVC 14.44, D3D12 WARP, default 3-slot pool): - `python3 x2w_pipe.py win2025 2060 --force --regex 'startup_readfirstlane_branch|startup_uniform_lane|startup_ngg_slice' --py-checks tests/startup_readfirstlane_branch_check.py` - dev (`ctest --preset dev`): 3/3 passed - release (`ctest --preset release`): 3/3 passed - Python check `tests/startup_readfirstlane_branch_check.py`: ok Note: the unfocused run failed because the generated command was too long for the Windows shell, so I ran the focused targets above. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 06:18 UTC · original

Closing as superseded: the branched v_readfirstlane_b32 entry-block and post-entry-block lowering landed on main via #2183 and #2203.

**@⁠tedin7** on GitHub · 2026-11-25 06:18 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#issuecomment-7154658783) Closing as superseded: the branched `v_readfirstlane_b32` entry-block and post-entry-block lowering landed on `main` via #2183 and #2203.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 23:54 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0cf21551f9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

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".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 23:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#pullrequestreview-6049356277) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `0cf21551f9` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". 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". </details>
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-25 04:48 UTC · original · requested changes

At c346072c, the branch proof misses values that vary through control flow. I ran a synthetic Stage input that compares varying v0 into VCC, branches on vccz, sets s7 to 1 on the fallthrough arm and 2 on the target arm, then joins for v_mov_b32 v4, s7; v_readfirstlane_b32 s6, v4. The proof accepts it with no refusals, and the common block actually emits v4 = 0x00000002u; s6 = v4; even on the path that assigned 1. The scan tracks scalar dataflow, but the branch condition never taints the two constant writes, and the scalar constant recorded from the last visited block leaks into the join.

Please retain the entry proof from #2183 and refuse this later-block case until the scalar inputs are proven on all incoming paths or redefined in the block itself. Add the two distinct-arm constants as a negative control, alongside a same-block redefinition positive. #2203 changes the same proof area, so please coordinate the shared controls there before updating both branches.

**@⁠R0Y00** on GitHub · 2026-11-25 04:48 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2060#pullrequestreview-6052006840) · **requested changes** At `c346072c`, the branch proof misses values that vary through control flow. I ran a synthetic Stage input that compares varying v0 into VCC, branches on vccz, sets s7 to 1 on the fallthrough arm and 2 on the target arm, then joins for `v_mov_b32 v4, s7; v_readfirstlane_b32 s6, v4`. The proof accepts it with no refusals, and the common block actually emits `v4 = 0x00000002u; s6 = v4;` even on the path that assigned 1. The scan tracks scalar dataflow, but the branch condition never taints the two constant writes, and the scalar constant recorded from the last visited block leaks into the join. Please retain the entry proof from #2183 and refuse this later-block case until the scalar inputs are proven on all incoming paths or redefined in the block itself. Add the two distinct-arm constants as a negative control, alongside a same-block redefinition positive. #2203 changes the same proof area, so please coordinate the shared controls there before updating both branches.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.