Recompiler: split wave64 halves skip the exchange at local votes and uniform first-lane reads #3563

Closed
Royalflamejlh wants to merge 3 commits from upstream-pr/3563 into main
Royalflamejlh commented 2026-12-01 06:34:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-01T06:34:35Z.


A split wave64 compute or mesh program on a GPU with 32-lane waves only meets its other half at every mask read whole and every v_readfirstlane. Three recognised cases now need no meeting. Over the wave64 compute and mesh programs of one retail pack without LDS (9,074 programs), the places where the halves meet went from 217,578 to 112,237. That is a static count of sites, not GPU time, and it was taken on a tree that carries this change beside other unmerged pull requests, not on this branch. #3114 measures the exchange at 2.6x a program's GPU time.

The three commits can be three pull requests (the first stands alone, the other two need it) if that is easier to review.

What is in it (crates/xcl/src/gpu/dxil/idioms.rs, new, 677 lines with tests; direct translator only)

  • Local vote. A forward s_cbranch_execz that only skips per-lane work reads each half's own word of EXEC, so the compare behind it stays in its half. It holds when the skipped side has only per-lane work under EXEC, scalar arithmetic, non-coherent scalar loads or mesh exports; no lane read or write, LDS, barrier or message; no exchanged mask; forward branches that stay inside; EXEC within the EXEC at the branch; and no SGPR written there that is read after it.
  • Uniform first lane. v_readfirstlane of a value made, in the same block and after the last EXEC write, by plain VALU on scalars: each half reads its own first running lane when both halves have one; otherwise the exchange runs as before.
  • Scalar constants. s_movk_i32, s_cmovk_i32, s_addk_i32, s_mulk_i32 and s_cmpk_* were taken to read every register, which forced an exchange on any compare before them.
  • XCL_WAVE64_IDIOMS=0 turns all three off and is part of the translated cache's identity. Kernel::exchange_sites counts the sites.

848 changed lines (825 added) in three commits of 528, 242 and 57 added lines, each a form of its own that the others do not need; about a third of each is tests.

Tested

  • RTX 4060 Ti 16 GB, NVIDIA 615.71.09, AMD Ryzen 9 9950X3D, Linux, Wine 11.21 Staging, vkd3d-proton master with local patches, x86_64-pc-windows-gnu, release. Head 8a02160af (bmjask's three review points fixed; idioms mask_exchange shaders:: pso:: 151 passed, 0 failed, 2 ignored, 17 SKIPPED; gpu::dxil 316 passed, 1 failed (directed_reference_basics, which fails on main under Wine), 4 ignored; the GPU tests not rerun on this head). The results below are of f0e1c97f3, on main 493dbd3d.
  • cargo test -p xcl --release --lib gpu::dxil -- --test-threads=2: 314 passed, 1 failed, 4 ignored. SKIPPED: dispatch_chain_native_wave64_builds_whole (no wave64). The failure is round_tests::directed_reference_basics, which fails the same way on main.
  • On the GPU: gpu_split_wave64_local_votes_leave_what_the_exchange_leaves and gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads passed (groups of 32, 48, 64, 96 and 128 threads; idioms on against off, and against the console's values). Both are compute programs: the votes also apply to mesh programs, which no GPU test here covers.
  • Site counts on the test programs: 4 to 1, and 12 to 6. Each recogniser has a test with near-misses it refuses, among them a value that depends on a per-lane mask it does not name (v_div_fmas, a carry-in whose carry-out goes nowhere, v_dot2c / v_dot4c, a 16-bit result).
  • A retail title, on another tree that carries these commits beside other unmerged pull requests: 1 run, 855 s, no crash, no device removal. That run had XCL_GPU_PROFILE=1, which makes a queue run its draws and dispatches one after the other; on a later head of that tree the title lost its device at the world start without the switch (2 of 2 runs, with folding on and with it off) and ran 600 s with it (1 of 1), so the run says nothing about this change with the GPU's work overlapping.
  • Native Windows, by AAsobu (report below; RTX 3090 24 GB, driver 621.24, this head against main 493dbd3d, a retail title in its world, 2 measured runs of 420 s each): no device removal, and no change in presents, draws or dispatches per 2 s outside the spread of two runs of one build. The suite was not run there.

Regression run
RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 Pro 26300, release builds by scripts/smoke.ps1, the same retail title for 60 s each.

main:

xcl-smoke v1
commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f
gpu: NVIDIA GeForce RTX 5070 Ti
title: 5330474d
seconds: 60
exit: 0x0
frames shown: 1620 (PresentX 1621)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 15476 MB

this PR's head:

xcl-smoke v1
commit: 8a02160af1d6152099312b8988ba2ac361dd694e
gpu: NVIDIA GeForce RTX 5070 Ti
title: 5330474d
seconds: 60
exit: 0x0
frames shown: 1629 (PresentX 1629)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15581 MB

Not tested

  • Native Windows, AMD, any other NVIDIA card, the whole suite, a title from this branch, bench_split_wave64.
  • A removed exchange was also a point that ordered one half's global-memory writes before the other's later reads; the existing lane-by-lane masks have the same property (docs/wave64-on-wave32.md, "What is not exact").
  • The uniform read under a dispatch's thread limits.
  • #1193 does the uniform first-lane read on the HLSL path; it shares no file with this.

AI use

  • Claude Code. Claude Fable 5.2 wrote the code, the tests and this description. Claude Opus 5.5 wrote the stricter uniform-source check and its tests (squashed into 25590d0ee).
<!-- greyfinch-sync:ivall/xcl:issue:5580442118 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-01T06:34:35Z. --- A split wave64 compute or mesh program on a GPU with 32-lane waves only meets its other half at every mask read whole and every `v_readfirstlane`. Three recognised cases now need no meeting. Over the wave64 compute and mesh programs of one retail pack without LDS (9,074 programs), the places where the halves meet went from 217,578 to 112,237. That is a static count of sites, not GPU time, and it was taken on a tree that carries this change beside other unmerged pull requests, not on this branch. #3114 measures the exchange at 2.6x a program's GPU time. The three commits can be three pull requests (the first stands alone, the other two need it) if that is easier to review. **What is in it** (`crates/xcl/src/gpu/dxil/idioms.rs`, new, 677 lines with tests; direct translator only) - **Local vote.** A forward `s_cbranch_execz` that only skips per-lane work reads each half's own word of EXEC, so the compare behind it stays in its half. It holds when the skipped side has only per-lane work under EXEC, scalar arithmetic, non-coherent scalar loads or mesh exports; no lane read or write, LDS, barrier or message; no exchanged mask; forward branches that stay inside; EXEC within the EXEC at the branch; and no SGPR written there that is read after it. - **Uniform first lane.** `v_readfirstlane` of a value made, in the same block and after the last EXEC write, by plain VALU on scalars: each half reads its own first running lane when both halves have one; otherwise the exchange runs as before. - **Scalar constants.** `s_movk_i32`, `s_cmovk_i32`, `s_addk_i32`, `s_mulk_i32` and `s_cmpk_*` were taken to read every register, which forced an exchange on any compare before them. - `XCL_WAVE64_IDIOMS=0` turns all three off and is part of the translated cache's identity. `Kernel::exchange_sites` counts the sites. 848 changed lines (825 added) in three commits of 528, 242 and 57 added lines, each a form of its own that the others do not need; about a third of each is tests. **Tested** - RTX 4060 Ti 16 GB, NVIDIA 615.71.09, AMD Ryzen 9 9950X3D, Linux, Wine 11.21 Staging, vkd3d-proton master with local patches, `x86_64-pc-windows-gnu`, release. Head `8a02160af` (bmjask's three review points fixed; `idioms mask_exchange shaders:: pso::` 151 passed, 0 failed, 2 ignored, 17 SKIPPED; `gpu::dxil` 316 passed, 1 failed (`directed_reference_basics`, which fails on `main` under Wine), 4 ignored; the GPU tests not rerun on this head). The results below are of `f0e1c97f3`, on `main` `493dbd3d`. - `cargo test -p xcl --release --lib gpu::dxil -- --test-threads=2`: 314 passed, 1 failed, 4 ignored. SKIPPED: `dispatch_chain_native_wave64_builds_whole` (no wave64). The failure is `round_tests::directed_reference_basics`, which fails the same way on `main`. - On the GPU: `gpu_split_wave64_local_votes_leave_what_the_exchange_leaves` and `gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads` passed (groups of 32, 48, 64, 96 and 128 threads; idioms on against off, and against the console's values). Both are compute programs: the votes also apply to mesh programs, which no GPU test here covers. - Site counts on the test programs: 4 to 1, and 12 to 6. Each recogniser has a test with near-misses it refuses, among them a value that depends on a per-lane mask it does not name (`v_div_fmas`, a carry-in whose carry-out goes nowhere, `v_dot2c` / `v_dot4c`, a 16-bit result). - A retail title, on another tree that carries these commits beside other unmerged pull requests: 1 run, 855 s, no crash, no device removal. That run had `XCL_GPU_PROFILE=1`, which makes a queue run its draws and dispatches one after the other; on a later head of that tree the title lost its device at the world start without the switch (2 of 2 runs, with folding on and with it off) and ran 600 s with it (1 of 1), so the run says nothing about this change with the GPU's work overlapping. - Native Windows, by AAsobu (report below; RTX 3090 24 GB, driver 621.24, this head against `main` `493dbd3d`, a retail title in its world, 2 measured runs of 420 s each): no device removal, and no change in presents, draws or dispatches per 2 s outside the spread of two runs of one build. The suite was not run there. **Regression run** RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 Pro 26300, release builds by `scripts/smoke.ps1`, the same retail title for 60 s each. `main`: ``` xcl-smoke v1 commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f gpu: NVIDIA GeForce RTX 5070 Ti title: 5330474d seconds: 60 exit: 0x0 frames shown: 1620 (PresentX 1621) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 15476 MB ``` this PR's head: ``` xcl-smoke v1 commit: 8a02160af1d6152099312b8988ba2ac361dd694e gpu: NVIDIA GeForce RTX 5070 Ti title: 5330474d seconds: 60 exit: 0x0 frames shown: 1629 (PresentX 1629) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15581 MB ``` **Not tested** - Native Windows, AMD, any other NVIDIA card, the whole suite, a title from this branch, `bench_split_wave64`. - A removed exchange was also a point that ordered one half's global-memory writes before the other's later reads; the existing lane-by-lane masks have the same property (`docs/wave64-on-wave32.md`, "What is not exact"). - The uniform read under a dispatch's thread limits. - #1193 does the uniform first-lane read on the HLSL path; it shares no file with this. **AI use** - Claude Code. Claude Fable 5.2 wrote the code, the tests and this description. Claude Opus 5.5 wrote the stricter uniform-source check and its tests (squashed into `25590d0ee`).
Foniass commented 2026-12-01 07:11:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:11:43Z.


Review (head edc0e4e7, diff read, not a merge-check; draft with PR description red, so not built or run here):

  • idioms.rs ~207-209: the uniform-value check only looks at v_cndmask's mask, so an instruction with a hidden per-lane VCC input (e.g. v_div_fmas_f32 with scalar operands under a VCC that differs per lane) is taken as uniform, and the halves could then read a different first lane than the console. Rare in compiler output, but worth refusing implicit-VCC instructions.
  • Local votes also apply to mesh programs (exports allowed on the skipped side, ~77), but the GPU tests cover compute only.
  • 805 lines; splitting along the three commits as offered would help (the SOPK commit stands alone).
  • Still owed: both xcl-smoke blocks (why PR description fails), the whole suite on native Windows, and AMD. The exchange counts are static site counts from a tree with other PRs in it, not GPU time. #2343 batches the same direct-path v_readfirstlane exchange and conflicts in compact.rs / kernel.rs; #1193 does the uniform first-lane read on the HLSL path.

Fine: the fixed-point retraction of non-local votes, the EXEC-within-branch tracking, the s_or_b64 exec, exec, s restore (every path keeps EXEC inside s), both halves entering the fallback together, and the SOPK change (x64_masks already treats s_addk / s_mulk / s_cmovk as read-modify-write). On by default with XCL_WAVE64_IDIOMS=0 to turn it off; merges cleanly with main and #3504.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7303756378 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7303756378). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:11:43Z. --- Review (head edc0e4e7, diff read, not a merge-check; draft with `PR description` red, so not built or run here): - `idioms.rs` ~207-209: the uniform-value check only looks at `v_cndmask`'s mask, so an instruction with a hidden per-lane VCC input (e.g. `v_div_fmas_f32` with scalar operands under a VCC that differs per lane) is taken as uniform, and the halves could then read a different first lane than the console. Rare in compiler output, but worth refusing implicit-VCC instructions. - Local votes also apply to mesh programs (exports allowed on the skipped side, ~77), but the GPU tests cover compute only. - 805 lines; splitting along the three commits as offered would help (the SOPK commit stands alone). - Still owed: both xcl-smoke blocks (why `PR description` fails), the whole suite on native Windows, and AMD. The exchange counts are static site counts from a tree with other PRs in it, not GPU time. #2343 batches the same direct-path `v_readfirstlane` exchange and conflicts in `compact.rs` / `kernel.rs`; #1193 does the uniform first-lane read on the HLSL path. Fine: the fixed-point retraction of non-local votes, the EXEC-within-branch tracking, the `s_or_b64 exec, exec, s` restore (every path keeps EXEC inside `s`), both halves entering the fallback together, and the SOPK change (x64_masks already treats `s_addk` / `s_mulk` / `s_cmovk` as read-modify-write). On by default with `XCL_WAVE64_IDIOMS=0` to turn it off; merges cleanly with main and #3504. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Royalflamejlh commented 2026-12-01 08:05:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-01T08:05:01Z.


Thanks. The v_div_fmas point is right, and it was not the only one: a carry-in whose carry-out goes to null, v_dot2c / v_dot4c (they add to their destination) and 16-bit results (they keep the other half of theirs) also passed as uniform. The check now takes every mask input from the operand table and counts those destinations as operands, and each case has a near-miss test. It is squashed into the second commit; the branch is rebased onto main 493dbd3d, head f0e1c97f3.

gpu::dxil on it, RTX 4060 Ti under Wine: 314 passed, 1 failed (directed_reference_basics, as on main), 4 ignored; both GPU tests of the idioms passed.

Still true: the votes apply to mesh programs and the GPU tests are compute only (now said under Tested). I can open the three commits as three pull requests if that is wanted.

AI use: Claude Code. Claude Opus 5.5 checked the point and wrote the change; Claude Fable 5.2 ran the tests on the card and wrote this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7304850266 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7304850266). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-01T08:05:01Z. --- Thanks. The `v_div_fmas` point is right, and it was not the only one: a carry-in whose carry-out goes to null, `v_dot2c` / `v_dot4c` (they add to their destination) and 16-bit results (they keep the other half of theirs) also passed as uniform. The check now takes every mask input from the operand table and counts those destinations as operands, and each case has a near-miss test. It is squashed into the second commit; the branch is rebased onto `main` `493dbd3d`, head `f0e1c97f3`. `gpu::dxil` on it, RTX 4060 Ti under Wine: 314 passed, 1 failed (`directed_reference_basics`, as on `main`), 4 ignored; both GPU tests of the idioms passed. Still true: the votes apply to mesh programs and the GPU tests are compute only (now said under **Tested**). I can open the three commits as three pull requests if that is wanted. **AI use:** Claude Code. Claude Opus 5.5 checked the point and wrote the change; Claude Fable 5.2 ran the tests on the card and wrote this reply.
Foniass commented 2026-12-01 08:18:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:18:34Z.


Re-review (head f0e1c97f, diff read, not a merge-check: PR description still fails (no xcl-smoke blocks), so not built or run here). Follow-up to my review of edc0e4e7.

  • Uniform-value check: fixed. idioms.rs ~203 / ~207 now require every lane-mask input (v_cndmask, carry-in, v_div_fmas's VCC) to cover all of EXEC's lanes and count accumulator (*MAC*, v_dot2c / v_dot4c) and 16-bit destinations as inputs. I checked this against every VALU encoding in rdna2_spec.rs and found no mask input it misses; the near-miss tests cover each case.
  • Still open: the smoke pair (main and this head), a Windows run of the whole suite, AMD coverage, and a GPU test of local votes on mesh programs. The description still says the blocks are owed "before this leaves draft", but the PR is no longer a draft.
  • 812 lines, just over the ~800 rule, and the description says it could be three PRs.
  • AI use names only Claude Fable 5.2, while 22e2f916 carries an Opus 5.5 trailer.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7305147303 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7305147303). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:18:34Z. --- Re-review (head f0e1c97f, diff read, not a merge-check: `PR description` still fails (no xcl-smoke blocks), so not built or run here). Follow-up to my review of edc0e4e7. - **Uniform-value check: fixed.** `idioms.rs` ~203 / ~207 now require every lane-mask input (v_cndmask, carry-in, v_div_fmas's VCC) to cover all of EXEC's lanes and count accumulator (`*MAC*`, `v_dot2c` / `v_dot4c`) and 16-bit destinations as inputs. I checked this against every VALU encoding in `rdna2_spec.rs` and found no mask input it misses; the near-miss tests cover each case. - Still open: the smoke pair (main and this head), a Windows run of the whole suite, AMD coverage, and a GPU test of local votes on mesh programs. The description still says the blocks are owed "before this leaves draft", but the PR is no longer a draft. - 812 lines, just over the ~800 rule, and the description says it could be three PRs. - AI use names only Claude Fable 5.2, while 22e2f916 carries an Opus 5.5 trailer. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Foniass commented 2026-12-01 10:17:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:17:18Z.


Triage (#1607) – head f0e1c97

No open or merged PR makes the same change on the direct DXIL path. #1193 skips uniform v_readfirstlane exchanges on the HLSL path (recomp/x64_uniform.rs), and #2343 batches consecutive v_readfirstlane/v_readlane exchanges in dxil/lower_valu.rs instead of skipping them; both are different changes, though #2343 touches the same lowering and may conflict.
No concrete problem found in idioms.rs / mask_exchange.rs: uniform_reads excludes loads, MBCNT, cross-lane ops and SDWA/DPP forms, the fallback exchange in read_first_lane_uniform is entered by both halves on the same condition, and the compact-form key includes uniform_reads.
The PR description check fails because the two xcl-smoke blocks are missing, and at ~790 lines the three commits would be easier to review as the three PRs the description offers.
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:7307955763 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7307955763). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T10:17:18Z. --- **Triage (#1607)** – head f0e1c97 No open or merged PR makes the same change on the direct DXIL path. #1193 skips uniform v_readfirstlane exchanges on the HLSL path (recomp/x64_uniform.rs), and #2343 batches consecutive v_readfirstlane/v_readlane exchanges in dxil/lower_valu.rs instead of skipping them; both are different changes, though #2343 touches the same lowering and may conflict. No concrete problem found in idioms.rs / mask_exchange.rs: uniform_reads excludes loads, MBCNT, cross-lane ops and SDWA/DPP forms, the fallback exchange in read_first_lane_uniform is entered by both halves on the same condition, and the compact-form key includes uniform_reads. The PR description check fails because the two xcl-smoke blocks are missing, and at ~790 lines the three commits would be easier to review as the three PRs the description offers. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
AAsobu commented 2026-12-01 12:19:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by AAsobu on 2026-12-01T12:19:24Z.


Test report on head f0e1c97f (on main 493dbd3d), retail title in the world, NVIDIA wave32. Not a merge-check: the test suite was not run.

Setup: release builds of main 493dbd3d (A) and this head as is (B; XCL_WAVE64_IDIOMS unset, so on), xcl.exe with the #2590 profile at 2048 MB. Env: XCL_PREPARE=0 XCL_DIRECT_DXIL=1 XCL_DXC_THREADS=4 XCL_NETWORK=0 XCL_DRED=1 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=1000 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=4, start prompt by XCL_PRESS_A_AT, no input. Runs of 420 s in the order B, A, B, A, B; the first B run only warmed this head's translated and driver caches (its source hash gives it a cache of its own) and is left out. Measured from world entry (first two-pass mesh dispatch) + 30 s to the end.

A1 B1 A2 B2
world entry 150 s 147 s 119 s 155 s
presents per 2 s 1.07 1.09 1.10 1.03
draws per 2 s 4482 4616 4832 4433
dispatches per 2 s 5434 5528 5928 5490
2 s windows with no present 10 % 12 % 7 % 14 %
process CPU (cores busy) 8.0 8.6 5.3 7.8
peak process commit, MB 43,326 41,187 43,751 42,351
peak VRAM, MB 17,057 16,680 17,528 17,101
skipped draws (whole run) 0 73 0 0
device removals 0 0 0 0
  • No frame-rate change on this title and card: 1.09 / 1.03 presents per 2 s against 1.07 / 1.10, within the spread of two runs of one build. Draws and dispatches per 2 s, CPU and memory are within that spread too.
  • B1 still finished a few pipelines (73 draws skipped while they were built); B2 skipped none.
  • Nothing changed on screen, as expected for this change, and no device removal in any of the five runs.
  • What I cannot tell from these logs: how many of the exchange sites this head removes are in the programs this title spends its GPU time on in this part of the world (the idioms apply only to programs without LDS), or the GPU time of those programs.

hardware / tool and model: NVIDIA GeForce RTX 3090 24 GB (driver 621.24, wave32 only), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5), numbers from the logs checked by me

<!-- greyfinch-sync:ivall/xcl:comment:7310966596 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7310966596). Originally posted by [AAsobu](https://github.com/AAsobu) on 2026-12-01T12:19:24Z. --- Test report on head [`f0e1c97f`](https://github.com/xcl-dev/xcl/commit/f0e1c97f315e05655798ecd2e1884f502aa0e149) (on `main` `493dbd3d`), retail title in the world, NVIDIA wave32. Not a merge-check: the test suite was not run. **Setup:** release builds of `main` `493dbd3d` (A) and this head as is (B; `XCL_WAVE64_IDIOMS` unset, so on), `xcl.exe` with the #2590 profile at 2048 MB. Env: `XCL_PREPARE=0 XCL_DIRECT_DXIL=1 XCL_DXC_THREADS=4 XCL_NETWORK=0 XCL_DRED=1 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=1000 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=4`, start prompt by `XCL_PRESS_A_AT`, no input. Runs of 420 s in the order B, A, B, A, B; the first B run only warmed this head's translated and driver caches (its source hash gives it a cache of its own) and is left out. Measured from world entry (first two-pass mesh dispatch) + 30 s to the end. | | A1 | B1 | A2 | B2 | |---|---|---|---|---| | world entry | 150 s | 147 s | 119 s | 155 s | | presents per 2 s | 1.07 | 1.09 | 1.10 | 1.03 | | draws per 2 s | 4482 | 4616 | 4832 | 4433 | | dispatches per 2 s | 5434 | 5528 | 5928 | 5490 | | 2 s windows with no present | 10 % | 12 % | 7 % | 14 % | | process CPU (cores busy) | 8.0 | 8.6 | 5.3 | 7.8 | | peak process commit, MB | 43,326 | 41,187 | 43,751 | 42,351 | | peak VRAM, MB | 17,057 | 16,680 | 17,528 | 17,101 | | skipped draws (whole run) | 0 | 73 | 0 | 0 | | device removals | 0 | 0 | 0 | 0 | - No frame-rate change on this title and card: 1.09 / 1.03 presents per 2 s against 1.07 / 1.10, within the spread of two runs of one build. Draws and dispatches per 2 s, CPU and memory are within that spread too. - B1 still finished a few pipelines (73 draws skipped while they were built); B2 skipped none. - Nothing changed on screen, as expected for this change, and no device removal in any of the five runs. - What I cannot tell from these logs: how many of the exchange sites this head removes are in the programs this title spends its GPU time on in this part of the world (the idioms apply only to programs without LDS), or the GPU time of those programs. hardware / tool and model: NVIDIA GeForce RTX 3090 24 GB (driver 621.24, wave32 only), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5), numbers from the logs checked by me
bmjask commented 2026-12-01 20:01:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-01T20:01:44Z.

Code review location: crates/xcl/src/gpu/dxil/idioms.rs; line 37

@@ -0,0 +1,683 @@
+//! Idioms of a split wave64 compute or mesh program (`docs/wave64-on-wave32.md`, "Idioms"):
+//! instruction sequences around a whole-wave value that are exact without its exchange.
+//!
+//! A local vote: a forward `s_cbranch_execz` over lane work only. A half none of whose lanes
+//! is in EXEC loses nothing by skipping that work, whatever the other half's lanes do, so the
+//! branch reads each half's own word of EXEC and the compare behind it stays in its half.
+//! Where the skipped side ends at `s_or_b64 exec, exec, s` of the EXEC saved before the vote,
+//! EXEC there is within `s`, so the result is `s` and does not ask for EXEC whole.
+//!
+//! A uniform first lane: `v_readfirstlane` of a value every lane of EXEC holds (the compiler's
+//! scalar arithmetic through a VGPR). A half with a lane in EXEC reads its own; the halves
+//! exchange only when one of them has none.
+use std::collections::{BTreeMap, BTreeSet};
+
+use super::cfg::{Cfg, Term};
+use super::lower::Lw;
+use super::mask_exchange::{self, Uses, EXEC, SCC};
+use super::module::{BinOp, Pred, Value};
+use crate::gpu::{rdna2::{self, Decoded, Variant}, recomp::x64_masks};
+
+/// `XCL_WAVE64_IDIOMS=0` exchanges every such value.
+pub fn enabled() -> bool {
+    #[cfg(test)]
+    if let Some(v) = IDIOMS_IN_TEST.with(|c| c.get()) {
+        return v;
+    }
+    static ON: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
+    *ON.get_or_init(|| std::env::var("XCL_WAVE64_IDIOMS").map_or(true, |v| v.trim() != "0"))
+}
+
+#[cfg(test)]
+thread_local! {
+    pub(super) static IDIOMS_IN_TEST: std::cell::Cell<Option<bool>> = const { std::cell::Cell::new(None) };
+}
+
+/// SOPK instructions that read and write what their operands say, no more.
+pub(super) fn plain_sopk(name: &str) -> bool {

plain_sopk leaves out S_WAITCNT_VSCNT, S_WAITCNT_VMCNT/LGKMCNT/EXPCNT and S_VERSION. They lower to no-ops but uses() still treats them as reading every register (read: !0). s_waitcnt_vscnt null, 0 is very common after stores, so any local vote whose skipped side contains one is taken back. Separately, lane_work lists S_WAITCNT_VSCNT under ENC_SOPP, where it can never match because it's SOPK.

<!-- greyfinch-sync:ivall/xcl:review-comment:4760167346 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#discussion_r4760167346). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-01T20:01:44Z. **Code review location:** `crates/xcl/src/gpu/dxil/idioms.rs`; line 37 ~~~~diff @@ -0,0 +1,683 @@ +//! Idioms of a split wave64 compute or mesh program (`docs/wave64-on-wave32.md`, "Idioms"): +//! instruction sequences around a whole-wave value that are exact without its exchange. +//! +//! A local vote: a forward `s_cbranch_execz` over lane work only. A half none of whose lanes +//! is in EXEC loses nothing by skipping that work, whatever the other half's lanes do, so the +//! branch reads each half's own word of EXEC and the compare behind it stays in its half. +//! Where the skipped side ends at `s_or_b64 exec, exec, s` of the EXEC saved before the vote, +//! EXEC there is within `s`, so the result is `s` and does not ask for EXEC whole. +//! +//! A uniform first lane: `v_readfirstlane` of a value every lane of EXEC holds (the compiler's +//! scalar arithmetic through a VGPR). A half with a lane in EXEC reads its own; the halves +//! exchange only when one of them has none. +use std::collections::{BTreeMap, BTreeSet}; + +use super::cfg::{Cfg, Term}; +use super::lower::Lw; +use super::mask_exchange::{self, Uses, EXEC, SCC}; +use super::module::{BinOp, Pred, Value}; +use crate::gpu::{rdna2::{self, Decoded, Variant}, recomp::x64_masks}; + +/// `XCL_WAVE64_IDIOMS=0` exchanges every such value. +pub fn enabled() -> bool { + #[cfg(test)] + if let Some(v) = IDIOMS_IN_TEST.with(|c| c.get()) { + return v; + } + static ON: std::sync::OnceLock<bool> = std::sync::OnceLock::new(); + *ON.get_or_init(|| std::env::var("XCL_WAVE64_IDIOMS").map_or(true, |v| v.trim() != "0")) +} + +#[cfg(test)] +thread_local! { + pub(super) static IDIOMS_IN_TEST: std::cell::Cell<Option<bool>> = const { std::cell::Cell::new(None) }; +} + +/// SOPK instructions that read and write what their operands say, no more. +pub(super) fn plain_sopk(name: &str) -> bool { ~~~~ --- `plain_sopk` leaves out `S_WAITCNT_VSCNT`, `S_WAITCNT_VMCNT/LGKMCNT/EXPCNT` and `S_VERSION`. They lower to no-ops but `uses()` still treats them as reading every register (`read: !0`). `s_waitcnt_vscnt null, 0` is very common after stores, so any local vote whose skipped side contains one is taken back. Separately, `lane_work` lists `S_WAITCNT_VSCNT` under ENC_SOPP, where it can never match because it's SOPK.
bmjask commented 2026-12-01 20:01:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-01T20:01:44Z.

Review: COMMENTED


Review of f0e1c97f: 3 finding(s). 1 are inline. These are on lines outside the diff:

crates/xcl/src/shaders.rs:35: XCL_WAVE64_IDIOMS isn't in semantic_pipeline_setting, and on the HLSL backend pso.rs:379 also leaves the tag out of the translated identity. A run with XCL_WAVE64_IDIOMS=0 keeps the same warm_settings_key() / translation_cache_identity(), so a warm pipeline library built with the idioms on is reused for a run that turns them off.

crates/xcl/src/gpu/dxil/mask_exchange.rs:65: s_cmpk_* and s_addk_i32 write SCC when lowered (lower.rs ~1278-1297), but uses() only kills SCC demand for names starting with S_CMP_, and S_CMPK_EQ_I32 doesn't match. In v_cmp vcc; s_and_saveexec_b64 s4, vcc; ...; s_cmpk_eq_i32 s5, 7; s_cbranch_scc1, the branch's SCC demand passes the S_CMPK, reaches the saveexec, and vcc gets exchanged even with the idioms on. Adding S_CMPK_ and S_ADDK_I32 to the SCC-kill list fixes it.


These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6139049148 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#pullrequestreview-6139049148). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-01T20:01:44Z. **Review:** COMMENTED --- Review of `f0e1c97f`: 3 finding(s). 1 are inline. These are on lines outside the diff: **`crates/xcl/src/shaders.rs:35`**: `XCL_WAVE64_IDIOMS` isn't in `semantic_pipeline_setting`, and on the HLSL backend `pso.rs:379` also leaves the tag out of the translated identity. A run with `XCL_WAVE64_IDIOMS=0` keeps the same `warm_settings_key()` / `translation_cache_identity()`, so a warm pipeline library built with the idioms on is reused for a run that turns them off. **`crates/xcl/src/gpu/dxil/mask_exchange.rs:65`**: `s_cmpk_*` and `s_addk_i32` write SCC when lowered (`lower.rs` ~1278-1297), but `uses()` only kills SCC demand for names starting with `S_CMP_`, and `S_CMPK_EQ_I32` doesn't match. In `v_cmp vcc; s_and_saveexec_b64 s4, vcc; ...; s_cmpk_eq_i32 s5, 7; s_cbranch_scc1`, the branch's SCC demand passes the S_CMPK, reaches the saveexec, and `vcc` gets exchanged even with the idioms on. Adding `S_CMPK_` and `S_ADDK_I32` to the SCC-kill list fixes it. --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
Royalflamejlh commented 2026-12-01 20:47:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-01T20:47:08Z.


@bmjask thank you, all three hold; fixed at 8a02160af.

  1. Partly: the direct backend's identity and the entries the HLSL backend sends to the direct translator already carried the tag; the warm pipeline library's settings key did not. XCL_WAVE64_IDIOMS is now a warm setting, tested on both backends (warm_settings_keep_the_wave64_idioms_switch_on_both_backends).
  2. Yes: s_cmpk_* and s_addk_i32 now replace SCC in the demand (mask_exchange.rs:65), tested with your sequence (split_wave64_scalar_constant_compares_replace_scc).
  3. Yes: the four s_waitcnt_*cnt and s_version are plain SOPK now, and the SOPP entry that could not match is gone; a vote over s_waitcnt_vscnt null, 0 stays local (a_vote_over_a_wait_stays_in_each_half). Exchanged compares in the pack: 90,754 to 90,743.

The same check found XCL_WAVE64_FOLD (#3562) and XCL_WAVE64_LANE_LOOP (#3561) missing from the warm settings too; both fixed there.

AI use: Claude Code (Claude Opus 5.5) checked each point, wrote the fixes and tests, and drafted this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7325267588 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7325267588). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-01T20:47:08Z. --- @bmjask thank you, all three hold; fixed at `8a02160af`. 1. Partly: the direct backend's identity and the entries the HLSL backend sends to the direct translator already carried the tag; the warm pipeline library's settings key did not. `XCL_WAVE64_IDIOMS` is now a warm setting, tested on both backends (`warm_settings_keep_the_wave64_idioms_switch_on_both_backends`). 2. Yes: `s_cmpk_*` and `s_addk_i32` now replace SCC in the demand (`mask_exchange.rs:65`), tested with your sequence (`split_wave64_scalar_constant_compares_replace_scc`). 3. Yes: the four `s_waitcnt_*cnt` and `s_version` are plain SOPK now, and the SOPP entry that could not match is gone; a vote over `s_waitcnt_vscnt null, 0` stays local (`a_vote_over_a_wait_stays_in_each_half`). Exchanged compares in the pack: 90,754 to 90,743. The same check found `XCL_WAVE64_FOLD` (#3562) and `XCL_WAVE64_LANE_LOOP` (#3561) missing from the warm settings too; both fixed there. AI use: Claude Code (Claude Opus 5.5) checked each point, wrote the fixes and tests, and drafted this reply.
Foniass commented 2026-12-01 21:14:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T21:14:03Z.


Follow-up review (head 8a02160a, since f0e1c97, diff read, not a merge-check; checks red):

  • Uniform-value check: fixed, unchanged since f0e1c97f.
  • Smoke pair, whole suite on native Windows, AMD: still open. Regression run says "None yet" (the reason PR description is red); Tested has only filtered runs under Wine; AMD is still under Not tested.
  • GPU test of local votes on mesh programs: still open. Votes still apply to mesh programs and both GPU tests are compute only.
  • Size: still open. Now 848 changed lines, over ~800, and the description says it could be three PRs rather than why it cannot; its "786 added lines in three commits (519, 235 and 32)" is out of date (now 528, 242, 57).
  • Draft wording and AI use: fixed. AI use names both models, though it still points at 22e2f916, which is no longer on the branch.

New: none.

Fine: S_CMPK_* and S_ADDK_I32 now kill SCC demand in mask_exchange.rs ~65, which is right because lower.rs ~1278-1297 sets SCC every time for both; S_WAITCNT_*CNT and S_VERSION are plain SOPK (idioms.rs ~38) and lower to nothing; with XCL_WAVE64_IDIOMS=0 every SOPK stays opaque; XCL_WAVE64_IDIOMS is now a warm setting, tested on both backends; each fix has a test.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7325946613 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7325946613). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T21:14:03Z. --- Follow-up review (head 8a02160a, since f0e1c97, diff read, not a merge-check; checks red): - **Uniform-value check:** fixed, unchanged since `f0e1c97f`. - **Smoke pair, whole suite on native Windows, AMD:** still open. **Regression run** says "None yet" (the reason `PR description` is red); **Tested** has only filtered runs under Wine; AMD is still under **Not tested**. - **GPU test of local votes on mesh programs:** still open. Votes still apply to mesh programs and both GPU tests are compute only. - **Size:** still open. Now 848 changed lines, over ~800, and the description says it could be three PRs rather than why it cannot; its "786 added lines in three commits (519, 235 and 32)" is out of date (now 528, 242, 57). - **Draft wording and AI use:** fixed. **AI use** names both models, though it still points at `22e2f916`, which is no longer on the branch. New: none. Fine: `S_CMPK_*` and `S_ADDK_I32` now kill SCC demand in `mask_exchange.rs` ~65, which is right because `lower.rs` ~1278-1297 sets SCC every time for both; `S_WAITCNT_*CNT` and `S_VERSION` are plain SOPK (`idioms.rs` ~38) and lower to nothing; with `XCL_WAVE64_IDIOMS=0` every SOPK stays opaque; `XCL_WAVE64_IDIOMS` is now a warm setting, tested on both backends; each fix has a test. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Decodere commented 2026-12-02 11:25:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T11:25:01Z.


merge-check
base: 1c8b551475
head: 8a02160af1
merge: clean (trial-merge commit 7976c6617b74c8f100cd232947fcba424dc5d1e8, git diff --check clean)
build: cargo build --workspace ok; cargo build --release -p xcl ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture (43 targets): 2919 passed, 1 failed, 52 ignored (+11 new runnable tests and +1 ignored census test vs main baseline 2908/1/51). All 11 new runnable tests passed with 0 skips on RTX 4060 (wave32), including both live GPU equivalence tests (gpu::dxil::idioms::tests::gpu_split_wave64_local_votes_leave_what_the_exchange_leaves and gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads), all 7 idioms unit tests, gpu::dxil::mask_exchange::tests::split_wave64_scalar_constant_compares_replace_scc, and shaders::warm_settings_keep_the_wave64_idioms_switch_on_both_backends. The single failure is the pre-existing Issue #3441 flake in tests/gpu_two_pass_cache_e2e.rs::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (line 584, left: 1, right: 0), reproduced identically on clean base 1c8b5514 and unrelated to split-wave64 idioms. 28 SKIPPED lines (host environment only: 22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)).
review: Read the full merged diff (+825/-23 across 10 files: gpu/dxil/{idioms.rs,mask_exchange.rs,kernel.rs,compact.rs,lanes.rs,lower.rs,lower_valu.rs,mod.rs}, shaders.rs, and docs/wave64-on-wave32.md). Strictly scoped to split-wave64 compute/mesh shaders without LDS (guarded by mask_exchange::plan in kernel.rs), with opt-out XCL_WAVE64_IDIOMS=0 wired into both the DXIL cache tag (compact_nest_tag) and warm pipeline settings hash (semantic_pipeline_setting), and uniform_reads.contains(&d.pc) included in the compact.rs instruction key. Checked soundness of all four idioms: (1) local forward s_cbranch_execz votes reject external entries, backward/escaping branches, cross-lane/LDS/barrier/coherent-SMEM/relative ops, live scalar writes, and any vote whose skipped compares get exchanged or whose EXEC write is read whole at the join; (2) empty_after inductively preserves s[r..r+2] ⊆ E_0 ⊆ saved_exec, so s_or_b64 exec, exec, saved at the join (info[end].inputs &= !EXEC) exact-restores full EXEC (and SCC) in both halves even if a vote is retracted; (3) uniform_reads restricts uniform VGPRs to single-block plain VALU ops excluding cross-lane/rank/relative/SDWA/DPP ops and treating MAC/DOT2C/DOT4C/16-bit-VDST ops (verified against rdna2_spec.rs) as RMW, while read_first_lane_uniform evaluates the identical lone predicate in both halves so both halves enter the exchange fallback together whenever either half has zero active lanes; (4) plain_sopk marks side-effect-free SOPK ops non-opaque and kills SCC on S_CMPK_*/S_ADDK_I32. No scope creep, deadlock risk, or UB.
performance: 60 s retail smoke (title: 29640639, ON by default on RTX 4060 wave32): 1626 frames (+11.2% vs 1c8b5514 baseline 1462 frames), 15191 MB peak commit (-5.3% vs 16043 MB baseline), 0 device removals, 0 crashes.

xcl-smoke v1
commit: 7976c6617b74c8f100cd232947fcba424dc5d1e8
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1626 (PresentX 1626)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15191 MB

verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7343890182 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7343890182). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T11:25:01Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: 8a02160af1d6152099312b8988ba2ac361dd694e merge: clean (trial-merge commit 7976c6617b74c8f100cd232947fcba424dc5d1e8, git diff --check clean) build: cargo build --workspace ok; cargo build --release -p xcl ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture (43 targets): 2919 passed, 1 failed, 52 ignored (+11 new runnable tests and +1 ignored census test vs main baseline 2908/1/51). All 11 new runnable tests passed with 0 skips on RTX 4060 (wave32), including both live GPU equivalence tests (gpu::dxil::idioms::tests::gpu_split_wave64_local_votes_leave_what_the_exchange_leaves and gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads), all 7 idioms unit tests, gpu::dxil::mask_exchange::tests::split_wave64_scalar_constant_compares_replace_scc, and shaders::warm_settings_keep_the_wave64_idioms_switch_on_both_backends. The single failure is the pre-existing Issue #3441 flake in tests/gpu_two_pass_cache_e2e.rs::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (line 584, left: 1, right: 0), reproduced identically on clean base 1c8b5514 and unrelated to split-wave64 idioms. 28 SKIPPED lines (host environment only: 22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)). review: Read the full merged diff (+825/-23 across 10 files: gpu/dxil/{idioms.rs,mask_exchange.rs,kernel.rs,compact.rs,lanes.rs,lower.rs,lower_valu.rs,mod.rs}, shaders.rs, and docs/wave64-on-wave32.md). Strictly scoped to split-wave64 compute/mesh shaders without LDS (guarded by `mask_exchange::plan` in `kernel.rs`), with opt-out `XCL_WAVE64_IDIOMS=0` wired into both the DXIL cache tag (`compact_nest_tag`) and warm pipeline settings hash (`semantic_pipeline_setting`), and `uniform_reads.contains(&d.pc)` included in the `compact.rs` instruction key. Checked soundness of all four idioms: (1) local forward `s_cbranch_execz` votes reject external entries, backward/escaping branches, cross-lane/LDS/barrier/coherent-SMEM/relative ops, live scalar writes, and any vote whose skipped compares get exchanged or whose EXEC write is read whole at the join; (2) `empty_after` inductively preserves `s[r..r+2] ⊆ E_0 ⊆ saved_exec`, so `s_or_b64 exec, exec, saved` at the join (`info[end].inputs &= !EXEC`) exact-restores full EXEC (and SCC) in both halves even if a vote is retracted; (3) `uniform_reads` restricts uniform VGPRs to single-block plain VALU ops excluding cross-lane/rank/relative/SDWA/DPP ops and treating MAC/DOT2C/DOT4C/16-bit-VDST ops (verified against `rdna2_spec.rs`) as RMW, while `read_first_lane_uniform` evaluates the identical `lone` predicate in both halves so both halves enter the exchange fallback together whenever either half has zero active lanes; (4) `plain_sopk` marks side-effect-free SOPK ops non-opaque and kills SCC on `S_CMPK_*`/`S_ADDK_I32`. No scope creep, deadlock risk, or UB. performance: 60 s retail smoke (title: 29640639, ON by default on RTX 4060 wave32): 1626 frames (+11.2% vs 1c8b5514 baseline 1462 frames), 15191 MB peak commit (-5.3% vs 16043 MB baseline), 0 device removals, 0 crashes. ``` xcl-smoke v1 commit: 7976c6617b74c8f100cd232947fcba424dc5d1e8 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1626 (PresentX 1626) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15191 MB ``` verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
bmjask commented 2026-12-02 14:11:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T14:11:08Z.


@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.

<!-- greyfinch-sync:ivall/xcl:comment:7348127142 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7348127142). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T14:11:08Z. --- @Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.
Royalflamejlh commented 2026-12-02 14:33:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T14:33:09Z.


Closing: this landed through #3655, which was stacked on it. git cherry origin/main shows all three of this PR's commits in main unchanged since d71578f8. Thanks to everyone who reviewed and merge-checked it.

AI use: Claude Code (Claude Opus 5.5) checked the commits and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7348740173 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3563#issuecomment-7348740173). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T14:33:09Z. --- Closing: this landed through #3655, which was stacked on it. `git cherry origin/main` shows all three of this PR's commits in `main` unchanged since `d71578f8`. Thanks to everyone who reviewed and merge-checked it. AI use: Claude Code (Claude Opus 5.5) checked the commits and wrote this comment.

Pull request closed

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!3563
No description provided.