Recompiler: pass and track explicit SRC_SCC in per-lane lowering #2833

Open
safesearch77 wants to merge 1 commit from upstream-pr/2833 into main
safesearch77 commented 2026-11-26 16:33:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by safesearch77 on 2026-11-26T16:33:06Z.


Pass and track explicit SRC_SCC (253) scalar operands consistently across the per-lane and split-wave64 (WaveSize(32)) Direct DXIL recompiler (crates/xcl/src/gpu/recomp/{lane_masks.rs,lower.rs}).

Previously, per-lane lowering had three interlocking gaps whenever an RDNA2 instruction read SCC via scalar source code 253 (src_scc) rather than an implicit OPR_SSRC_SPECIAL_SCC operand:

  1. Lower::bridge (crates/xcl/src/gpu/recomp/lower.rs:1753) checked operand(true, "OPR_SSRC_SPECIAL_SCC"), omitting (Var::Scc, zext(s)) from Ir::foreign inputs and skipping self.read_scc(b) whenever a bridged instruction (V_CVT_F32_U32 v, src_scc, S_BFE_U32, V_ADD_CO_CI_U32, SDWA src_scc, etc.) encoded 253 explicitly. In compute, split-wave64, and graphics modes (ComputeInit / setup_gfx pre-seeding VAR_SCC = 0), DxilIr::foreign succeeded while Lw silently read 0 (or a stale block-local VAR_SCC written by an earlier bridged instruction) instead of the live Var::Scc; in kernel mode it failed with "it reads register 125 the per-lane form did not pass" unless masked by an earlier bridged instruction in the same block; and partial-block SCC writes read after reconvergence bypassed the stale check.
  2. lane_masks::reads_scc (lane_masks.rs:282) and lower::compute_scc_liveness (lower.rs:1188) only scanned primary encoding fields ["SSRC0", "SSRC1", "SRC0", "SRC1", "SRC2", "SOFFSET"]. For Variant::Sdwa (SRC0 = 0xF9), scalar src_scc is encoded in the SDWA extension dword (S0 == 1 && VSRC0 == 253 or S1 == 1 && VSRC1 == 253), so lane_masks missed divergent mask-op SCC reads in !wave_branches and compute_scc_liveness marked scc_live_after = false in wave_branches (including split-wave64 compute), causing mask_nonzero_scc to skip the whole-wave ballot and hardcode SCC = false. Scanning raw primary fields without checking d.ienc.operands also caused false positives on unused fields (e.g. SRC2 = 253 on a 1-source ENC_VOP3 instruction or OPR_ATTR on V_INTERP_*).
  3. Lower::src64 (lower.rs:785) and Lower::src_bit (lower.rs:475) rejected code 253 ("64-bit source code 253" / "mask source code 253") instead of zero-extending SCC ((zext(scc), 0) in src64 and (lane == 0) & scc in src_bit, matching dxil/lower.rs:732 and recomp/emit.rs:840).

Part of #1269

What is in it

  • crates/xcl/src/gpu/recomp/lane_masks.rs: make reads_scc pub(super), inspect SDWA S0/VSRC0 and S1/VSRC1 scalar sources via emit::ext_encoding, and restrict primary-word 253 checks to active non-implicit input operands (excluding non-plain SRC0, relative-source S_MOVRELS_* / S_MOVRELSD_2_B32 SSRC0, and OPR_ATTR / OPR_PARAM) (+24 / -5).
  • crates/xcl/src/gpu/recomp/lower.rs: use lane_masks::reads_scc in both Lower::bridge and compute_scc_liveness, and handle source code 253 in Lower::src_bit and Lower::src64 (+13 / -6).
  • crates/xcl/src/gpu/recomp/lane_masks.rs (tests::sdwa_and_vop3_src_scc_reads_are_classified_accurately): verifies non-uniform mask-op SCC rejection for SDWA S0 and S1 src_scc, acceptance when S0/S1 are 0 (v253) or after S_AND_SAVEEXEC_B64, and no false positive on unused ENC_VOP3 SRC2 = 253 (+48).
  • crates/xcl/src/gpu/recomp/lower.rs (tests::explicit_src_scc_in_salu_valu_bridge_and_wave_liveness): CPU execution and Ir::foreign verification across 64-bit SALU & per-lane mask ops (S_MOV_B64, S_CSELECT_B64, V_CNDMASK_B32, S_AND_B64), bridged explicit SRC_SCC (V_CVT_F32_U32, S_BFE_U32), partial-block stale SCC refusal across reconvergence, and split-wave64 compute_scc_liveness whole-wave ballot preservation before SDWA src_scc (+161).

Tested

  • Linux x86_64 host, Rust stable (repo toolchain), cross-checked for x86_64-pc-windows-gnu: cargo check --offline --workspace --tests gave 0 errors and 0 new warnings (only the 3 pre-existing baseline warnings on 8b957bec, none in gpu/).
  • Linux x86_64 host native rustc --edition=2021 --test harness compiling gpu::{rdna2_spec, rdna2_xbox, rdna2} and gpu::recomp::{x64_masks, ssa, upper_lanes, lane_masks, lower} (with Windows D3D12/DXC runner plumbing stubbed; no lowering or analysis code modified):
    • On unmodified 8b957bec: all 4 red_green_scc_tests fail (0 passed; 4 failed: "unsupported V_CVT_F32_U32 (it reads register 125 the per-lane form did not pass)", missing lane_masks refusal on SDWA S0=1, VSRC0=253, ballots == 0 on split-wave64 S_AND_SAVEEXEC_B64 before SDWA src_scc, and "64-bit source code 253").
    • With f5a352c3: 107 passed; 0 failed; 1 ignored across all rdna2, x64_masks, ssa, upper_lanes, lane_masks, lower, and red_green_scc_tests unit tests.

Regression run

  • None yet. The paired Windows xcl-smoke blocks (8b957bec and f5a352c3) must be attached from a Windows GPU retail run before marking ready for review.

Not tested

  • Windows cargo test --workspace -- --test-threads=4 GPU execution suite (including D3D12 wave32 / split-wave64 / native wave64 dispatch and DXC dxcompiler.dll validation) and paired Windows scripts/smoke.ps1 retail runs. Prepared on a Linux CPU host without a Windows GPU or retail title.

AI use

  • Antigravity with Gemini 4 Carbon High (verified by Gemini 4 Hydrogen XHigh): identified the Lower::bridge, reads_scc / compute_scc_liveness, and src64 / src_bit SRC_SCC (253) defects, implemented the fix and unit tests, ran the Linux rustc --test RED-to-GREEN harness and x86_64-pc-windows-gnu workspace checks, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5513741657 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2833). Originally posted by [safesearch77](https://github.com/safesearch77) on 2026-11-26T16:33:06Z. --- Pass and track explicit `SRC_SCC` (`253`) scalar operands consistently across the per-lane and split-wave64 (`WaveSize(32)`) Direct DXIL recompiler (`crates/xcl/src/gpu/recomp/{lane_masks.rs,lower.rs}`). Previously, per-lane lowering had three interlocking gaps whenever an RDNA2 instruction read `SCC` via scalar source code `253` (`src_scc`) rather than an implicit `OPR_SSRC_SPECIAL_SCC` operand: 1. `Lower::bridge` (`crates/xcl/src/gpu/recomp/lower.rs:1753`) checked `operand(true, "OPR_SSRC_SPECIAL_SCC")`, omitting `(Var::Scc, zext(s))` from `Ir::foreign` inputs and skipping `self.read_scc(b)` whenever a bridged instruction (`V_CVT_F32_U32 v, src_scc`, `S_BFE_U32`, `V_ADD_CO_CI_U32`, SDWA `src_scc`, etc.) encoded `253` explicitly. In compute, split-wave64, and graphics modes (`ComputeInit` / `setup_gfx` pre-seeding `VAR_SCC = 0`), `DxilIr::foreign` succeeded while `Lw` silently read `0` (or a stale block-local `VAR_SCC` written by an earlier bridged instruction) instead of the live `Var::Scc`; in kernel mode it failed with `"it reads register 125 the per-lane form did not pass"` unless masked by an earlier bridged instruction in the same block; and partial-block `SCC` writes read after reconvergence bypassed the `stale` check. 2. `lane_masks::reads_scc` (`lane_masks.rs:282`) and `lower::compute_scc_liveness` (`lower.rs:1188`) only scanned primary encoding fields `["SSRC0", "SSRC1", "SRC0", "SRC1", "SRC2", "SOFFSET"]`. For `Variant::Sdwa` (`SRC0 = 0xF9`), scalar `src_scc` is encoded in the SDWA extension dword (`S0 == 1 && VSRC0 == 253` or `S1 == 1 && VSRC1 == 253`), so `lane_masks` missed divergent mask-op `SCC` reads in `!wave_branches` and `compute_scc_liveness` marked `scc_live_after = false` in `wave_branches` (including split-wave64 compute), causing `mask_nonzero_scc` to skip the whole-wave ballot and hardcode `SCC = false`. Scanning raw primary fields without checking `d.ienc.operands` also caused false positives on unused fields (e.g. `SRC2 = 253` on a 1-source `ENC_VOP3` instruction or `OPR_ATTR` on `V_INTERP_*`). 3. `Lower::src64` (`lower.rs:785`) and `Lower::src_bit` (`lower.rs:475`) rejected code `253` (`"64-bit source code 253"` / `"mask source code 253"`) instead of zero-extending `SCC` (`(zext(scc), 0)` in `src64` and `(lane == 0) & scc` in `src_bit`, matching `dxil/lower.rs:732` and `recomp/emit.rs:840`). Part of #1269 **What is in it** - `crates/xcl/src/gpu/recomp/lane_masks.rs`: make `reads_scc` `pub(super)`, inspect SDWA `S0`/`VSRC0` and `S1`/`VSRC1` scalar sources via `emit::ext_encoding`, and restrict primary-word `253` checks to active non-implicit input operands (excluding non-plain `SRC0`, relative-source `S_MOVRELS_*` / `S_MOVRELSD_2_B32` `SSRC0`, and `OPR_ATTR` / `OPR_PARAM`) (+24 / -5). - `crates/xcl/src/gpu/recomp/lower.rs`: use `lane_masks::reads_scc` in both `Lower::bridge` and `compute_scc_liveness`, and handle source code `253` in `Lower::src_bit` and `Lower::src64` (+13 / -6). - `crates/xcl/src/gpu/recomp/lane_masks.rs` (`tests::sdwa_and_vop3_src_scc_reads_are_classified_accurately`): verifies non-uniform mask-op `SCC` rejection for SDWA `S0` and `S1` `src_scc`, acceptance when `S0`/`S1` are `0` (`v253`) or after `S_AND_SAVEEXEC_B64`, and no false positive on unused `ENC_VOP3` `SRC2 = 253` (+48). - `crates/xcl/src/gpu/recomp/lower.rs` (`tests::explicit_src_scc_in_salu_valu_bridge_and_wave_liveness`): CPU execution and `Ir::foreign` verification across 64-bit SALU & per-lane mask ops (`S_MOV_B64`, `S_CSELECT_B64`, `V_CNDMASK_B32`, `S_AND_B64`), bridged explicit `SRC_SCC` (`V_CVT_F32_U32`, `S_BFE_U32`), partial-block stale `SCC` refusal across reconvergence, and split-wave64 `compute_scc_liveness` whole-wave ballot preservation before SDWA `src_scc` (+161). **Tested** - Linux x86_64 host, Rust stable (repo toolchain), cross-checked for `x86_64-pc-windows-gnu`: `cargo check --offline --workspace --tests` gave 0 errors and 0 new warnings (only the 3 pre-existing baseline warnings on `8b957bec`, none in `gpu/`). - Linux x86_64 host native `rustc --edition=2021 --test` harness compiling `gpu::{rdna2_spec, rdna2_xbox, rdna2}` and `gpu::recomp::{x64_masks, ssa, upper_lanes, lane_masks, lower}` (with Windows D3D12/DXC runner plumbing stubbed; no lowering or analysis code modified): - On unmodified `8b957bec`: all 4 `red_green_scc_tests` fail (`0 passed; 4 failed`: `"unsupported V_CVT_F32_U32 (it reads register 125 the per-lane form did not pass)"`, missing `lane_masks` refusal on SDWA `S0=1, VSRC0=253`, `ballots == 0` on split-wave64 `S_AND_SAVEEXEC_B64` before SDWA `src_scc`, and `"64-bit source code 253"`). - With `f5a352c3`: `107 passed; 0 failed; 1 ignored` across all `rdna2`, `x64_masks`, `ssa`, `upper_lanes`, `lane_masks`, `lower`, and `red_green_scc_tests` unit tests. **Regression run** - None yet. The paired Windows `xcl-smoke` blocks (`8b957bec` and `f5a352c3`) must be attached from a Windows GPU retail run before marking ready for review. **Not tested** - Windows `cargo test --workspace -- --test-threads=4` GPU execution suite (including D3D12 wave32 / split-wave64 / native wave64 dispatch and DXC `dxcompiler.dll` validation) and paired Windows `scripts/smoke.ps1` retail runs. Prepared on a Linux CPU host without a Windows GPU or retail title. **AI use** - Antigravity with Gemini 4 Carbon High (verified by Gemini 4 Hydrogen XHigh): identified the `Lower::bridge`, `reads_scc` / `compute_scc_liveness`, and `src64` / `src_bit` `SRC_SCC` (`253`) defects, implemented the fix and unit tests, ran the Linux `rustc --test` RED-to-GREEN harness and `x86_64-pc-windows-gnu` workspace checks, and drafted this PR description.
Smokeyqdqd commented 2026-11-26 17:06:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Smokeyqdqd on 2026-11-26T17:06:42Z.


Independent parent/head comparison on Windows 11 build 26200, Ryzen 7 5800X, RTX 3060 12 GB (NVIDIA 610.88), rustc 1.100.0 MSVC, DXC 1.9.2602.17, debug.

With XCL_ADAPTER=3060 and XCL_DIRECT_DXIL=1, I ran cargo test --offline --locked -p xcl --lib -- src_scc gpu_split_wave64_ gpu_scalar_loop_and_scc --test-threads=1 --nocapture on each revision.

  • Parent 8b957bec6f82495aec940944c6bf47faa02db590, with only the two new test hunks added: 8 passed, 2 failed, 0 ignored. The failures were sdwa_and_vop3_src_scc_reads_are_classified_accurately and explicit_src_scc_in_salu_valu_bridge_and_wave_liveness.
  • Clean PR head f5a352c3455bbc2bc0b1951f6e01636ddb311f0a: 10 passed, 0 failed, 0 ignored.

Neither run printed SKIPPED. Both new compiler tests distinguish the revisions. The scalar-loop GPU test and the six split-wave64 GPU regression tests passed on both. Scope was this filtered suite only.

AI use: Codex (GPT-6.2 Astra) ran the tests, checked the logs and drafted the report.

<!-- greyfinch-sync:ivall/xcl:comment:7198516313 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2833#issuecomment-7198516313). Originally posted by [Smokeyqdqd](https://github.com/Smokeyqdqd) on 2026-11-26T17:06:42Z. --- Independent parent/head comparison on Windows 11 build 26200, Ryzen 7 5800X, RTX 3060 12 GB (NVIDIA 610.88), rustc 1.100.0 MSVC, DXC 1.9.2602.17, debug. With `XCL_ADAPTER=3060` and `XCL_DIRECT_DXIL=1`, I ran `cargo test --offline --locked -p xcl --lib -- src_scc gpu_split_wave64_ gpu_scalar_loop_and_scc --test-threads=1 --nocapture` on each revision. - Parent `8b957bec6f82495aec940944c6bf47faa02db590`, with only the two new test hunks added: **8 passed, 2 failed, 0 ignored**. The failures were `sdwa_and_vop3_src_scc_reads_are_classified_accurately` and `explicit_src_scc_in_salu_valu_bridge_and_wave_liveness`. - Clean PR head `f5a352c3455bbc2bc0b1951f6e01636ddb311f0a`: **10 passed, 0 failed, 0 ignored**. Neither run printed `SKIPPED`. Both new compiler tests distinguish the revisions. The scalar-loop GPU test and the six split-wave64 GPU regression tests passed on both. Scope was this filtered suite only. **AI use:** Codex (GPT-6.2 Astra) ran the tests, checked the logs and drafted the report.
SzczepanGrela commented 2026-11-26 17:17:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-26T17:17:24Z.


RX 9070 / Wine per-lane SCC check at f5a352c3455bbc2bc0b1951f6e01636ddb311f0a against main 8b957bec6f82495aec940944c6bf47faa02db590. Head executes 30 per-lane combinations refused by main in this fixture. Six combinations remain translation refusals. All executed matrix outputs matched the independent expected values.

Tested

RX 9070 16 GB, RADV GFX1201 / Mesa 26.3.1-arch3.5 (mesa and vulkan-radeon packages 3:26.3.1-5), Ryzen 7 7700, CachyOS 7.3.0-5-cachyos, GE-Proton11-12 Wine 11.0 Staging with ntsync. Native d3d12/d3d12core/dxgi; vkd3d-proton 8293130ebe370b1+, local assertions-disabled build; DXC/DXIL 1.9.2602.17, Rust 1.97.1, release x86_64-pc-windows-gnu.

Exact pinned source copies, with both new CPU test functions copied unchanged to main and an identical local cfg(test) GPU fixture appended to lower_dxil.rs in both copies. All original source hashes reconstruct after removing the additions. No original assertion was changed. These were instrumented source copies, not clean Git checkouts.

cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run
wine <libtest.exe> gpu::recomp::lane_masks::tests:: gpu::recomp::lower::tests::explicit_src_scc_in_salu_valu_bridge_and_wave_liveness --nocapture --test-threads=N
wine <libtest.exe> gpu::recomp::lower_dxil::workflow_scc_matrix::kernel_scc_paths --exact --nocapture --test-threads=1
wine <libtest.exe> gpu::recomp::lower_dxil::workflow_scc_matrix::compute_scc_paths --exact --nocapture --test-threads=1

XCL_NETWORK=0, XCL_ADAPTER="AMD Radeon RX 9070", XCL_REQUIRE_GPU=wave64, XCL_DXC_THREADS=1, XCL_DIRECT_DXIL=1, XCL_PER_LANE=1, XCL_DIRECT_COMPACT=0, native DLL overrides and private enabled caches per process. The local fixture explicitly calls lower_dxil::kernel, kernel_split and compute_with; it records refusals without automatic fallback. Each accepted shader was validated with DXC validator 1.9 before GPU submission.

  • Original CPU selection at N=1 and N=4: head 15 passed / 0 failed / 0 ignored, main 13/2/0 per invocation. Both new tests fail on main.
  • Four existing GPU controls at both thread counts, on both revisions: 4/0/0 per invocation. Filters under gpu::recomp::lower_dxil::tests::: a_per_lane_compute_program_runs_on_the_gpu, split_wave64_dead_scc_skips_exchange_barrier, a_bridged_v_cmpx_keeps_the_lanes_outside_exec_out, the_runtime_path_takes_the_split_form.

The local fixture checks native Wave32, native Wave64 and split Wave64 using two hardware Wave32s. Kernel inputs cover zero-extended SCC in scalar/mask sources, true/false/true V_CVT_F32_U32 refresh, and SDWA S0/S1 SCC reads. Compute inputs additionally select the upper half with S_AND_SAVEEXEC_B64, restore EXEC, then consume SCC via SDWA. Empty-mask and overwritten-SCC controls check zero. In the native64/split64 upper-half cases, all 64 stored values equal lane + 1; empty/overwritten controls equal lane. Guard words remain intact.

Three fresh processes per entry/revision, alternating revision order, gave identical per-case outcomes:

Per process main per-lane executed / refused head per-lane executed / refused HLSL and instruction-DXIL controls, either revision
Kernel 0 / 12 11 / 1 24 executed, 0 refused
Compute 0 / 24 19 / 5 48 executed, 0 refused

Main reports 64-bit source code 253 in the native scalar/mask kernel cases; the bridged cases report it reads register 125 the per-lane form did not pass. On head, the native32 combined scalar/mask program still refuses S_AND_B64 with s126: a mask read as a number. Five native32 compute sequences still refuse S_AND_SAVEEXEC_B64 with writes EXEC, the same message as main. These sequences retain the B64 encoding in the native32 arm.

The local collection tests assert on any refusal, so each reports 0 passed / 1 failed / 0 ignored on both revisions, despite the increased coverage on head. Refused cases were never submitted to the GPU. Across 20 final harness invocations there were 0 ignored and 0 capability skips. The matrix evaluated 648 records and performed 522 validated GPU dispatches. Independently recomputed 16,608 kernel lane values, 336 scalar values and 71,760 compute words, including guards: zero mismatches. All 72 HLSL/instruction control shader containers matched byte-for-byte between revisions; each emitted case repeated byte-identically across its three runs.

Not tested

Graphics entry points, every explicit SCC consumer/encoding, partial-launch EXEC, more than one compute group or logical wave per group in the local matrix, end-to-end fallback, full workspace suite, native Windows, other adapters, retail data, scripts/smoke.ps1, FPS or compilation-time effects. No console-hardware oracle was used.

AI use

OpenAI Codex (GPT-6; exact serving variant not exposed) audited the diff, wrote local test-only fixtures, ran the paired tests, independently verified raw outputs/source/executable hashes, and drafted this report. Publication authorized by the account owner.

<!-- greyfinch-sync:ivall/xcl:comment:7198778217 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2833#issuecomment-7198778217). Originally posted by [SzczepanGrela](https://github.com/SzczepanGrela) on 2026-11-26T17:17:24Z. --- RX 9070 / Wine per-lane SCC check at `f5a352c3455bbc2bc0b1951f6e01636ddb311f0a` against main `8b957bec6f82495aec940944c6bf47faa02db590`. Head executes 30 per-lane combinations refused by main in this fixture. Six combinations remain translation refusals. All executed matrix outputs matched the independent expected values. **Tested** RX 9070 16 GB, RADV GFX1201 / Mesa `26.3.1-arch3.5` (`mesa` and `vulkan-radeon` packages `3:26.3.1-5`), Ryzen 7 7700, CachyOS `7.3.0-5-cachyos`, GE-Proton11-12 Wine 11.0 Staging with ntsync. Native d3d12/d3d12core/dxgi; vkd3d-proton `8293130ebe370b1+`, local assertions-disabled build; DXC/DXIL `1.9.2602.17`, Rust `1.97.1`, release `x86_64-pc-windows-gnu`. Exact pinned source copies, with both new CPU test functions copied unchanged to main and an identical local `cfg(test)` GPU fixture appended to `lower_dxil.rs` in both copies. All original source hashes reconstruct after removing the additions. No original assertion was changed. These were instrumented source copies, not clean Git checkouts. ```text cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run wine <libtest.exe> gpu::recomp::lane_masks::tests:: gpu::recomp::lower::tests::explicit_src_scc_in_salu_valu_bridge_and_wave_liveness --nocapture --test-threads=N wine <libtest.exe> gpu::recomp::lower_dxil::workflow_scc_matrix::kernel_scc_paths --exact --nocapture --test-threads=1 wine <libtest.exe> gpu::recomp::lower_dxil::workflow_scc_matrix::compute_scc_paths --exact --nocapture --test-threads=1 ``` `XCL_NETWORK=0`, `XCL_ADAPTER="AMD Radeon RX 9070"`, `XCL_REQUIRE_GPU=wave64`, `XCL_DXC_THREADS=1`, `XCL_DIRECT_DXIL=1`, `XCL_PER_LANE=1`, `XCL_DIRECT_COMPACT=0`, native DLL overrides and private enabled caches per process. The local fixture explicitly calls `lower_dxil::kernel`, `kernel_split` and `compute_with`; it records refusals without automatic fallback. Each accepted shader was validated with DXC validator 1.9 before GPU submission. - Original CPU selection at `N=1` and `N=4`: head **15 passed / 0 failed / 0 ignored**, main **13/2/0** per invocation. Both new tests fail on main. - Four existing GPU controls at both thread counts, on both revisions: **4/0/0** per invocation. Filters under `gpu::recomp::lower_dxil::tests::`: `a_per_lane_compute_program_runs_on_the_gpu`, `split_wave64_dead_scc_skips_exchange_barrier`, `a_bridged_v_cmpx_keeps_the_lanes_outside_exec_out`, `the_runtime_path_takes_the_split_form`. The local fixture checks native Wave32, native Wave64 and split Wave64 using two hardware Wave32s. Kernel inputs cover zero-extended SCC in scalar/mask sources, true/false/true `V_CVT_F32_U32` refresh, and SDWA S0/S1 SCC reads. Compute inputs additionally select the upper half with `S_AND_SAVEEXEC_B64`, restore EXEC, then consume SCC via SDWA. Empty-mask and overwritten-SCC controls check zero. In the native64/split64 upper-half cases, all 64 stored values equal `lane + 1`; empty/overwritten controls equal `lane`. Guard words remain intact. Three fresh processes per entry/revision, alternating revision order, gave identical per-case outcomes: | Per process | main per-lane executed / refused | head per-lane executed / refused | HLSL and instruction-DXIL controls, either revision | | --- | ---: | ---: | ---: | | Kernel | 0 / 12 | 11 / 1 | 24 executed, 0 refused | | Compute | 0 / 24 | 19 / 5 | 48 executed, 0 refused | Main reports `64-bit source code 253` in the native scalar/mask kernel cases; the bridged cases report `it reads register 125 the per-lane form did not pass`. On head, the native32 combined scalar/mask program still refuses `S_AND_B64` with `s126: a mask read as a number`. Five native32 compute sequences still refuse `S_AND_SAVEEXEC_B64` with `writes EXEC`, the same message as main. These sequences retain the B64 encoding in the native32 arm. The local collection tests assert on any refusal, so each reports **0 passed / 1 failed / 0 ignored on both revisions**, despite the increased coverage on head. Refused cases were never submitted to the GPU. Across 20 final harness invocations there were **0 ignored and 0 capability skips**. The matrix evaluated 648 records and performed 522 validated GPU dispatches. Independently recomputed 16,608 kernel lane values, 336 scalar values and 71,760 compute words, including guards: zero mismatches. All 72 HLSL/instruction control shader containers matched byte-for-byte between revisions; each emitted case repeated byte-identically across its three runs. **Not tested** Graphics entry points, every explicit SCC consumer/encoding, partial-launch EXEC, more than one compute group or logical wave per group in the local matrix, end-to-end fallback, full workspace suite, native Windows, other adapters, retail data, `scripts/smoke.ps1`, FPS or compilation-time effects. No console-hardware oracle was used. **AI use** OpenAI Codex (GPT-6; exact serving variant not exposed) audited the diff, wrote local test-only fixtures, ran the paired tests, independently verified raw outputs/source/executable hashes, and drafted this report. Publication authorized by the account owner.
Foniass commented 2026-12-01 09:01:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:01:55Z.


Triage (#1607) – head f5a352c

No open or merged PR makes the same change. Main reads SRC_SCC (253) only in Lower::src; this PR adds it to src_bit (only lane 0 can hold SCC) and src64 (zext(scc), 0). It also makes lane_masks::reads_scc look at real input fields only, including SDWA S0/S1, and passes Var::Scc to bridged instructions that encode 253 explicitly.
No problems found in the diff. Only the PR description check is red.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7306115508 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2833#issuecomment-7306115508). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:01:55Z. --- **Triage (#1607)** – head f5a352c No open or merged PR makes the same change. Main reads `SRC_SCC` (253) only in `Lower::src`; this PR adds it to `src_bit` (only lane 0 can hold SCC) and `src64` (`zext(scc), 0`). It also makes `lane_masks::reads_scc` look at real input fields only, including SDWA `S0`/`S1`, and passes `Var::Scc` to bridged instructions that encode 253 explicitly. No problems found in the diff. Only the `PR description` check is red. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2833:upstream-pr/2833'
git switch 'upstream-pr/2833'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2833'
git switch 'upstream-pr/2833'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2833'
git switch 'upstream-pr/2833'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2833'
git switch 'main'
git merge --squash 'upstream-pr/2833'
git switch 'main'
git merge --ff-only 'upstream-pr/2833'
git switch 'main'
git merge 'upstream-pr/2833'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2833
No description provided.