Recompiler: mark SRC_VCCZ/SRC_EXECZ whole-live in x64_masks S_MOVREL and VOP3 mask ops #2587

Merged
Decodere merged 1 commit from upstream-pr/2597 into main 2026-11-29 12:19:50 +00:00
Decodere commented 2026-11-26 01:16:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T01:16:50Z.


What is in it

Fixes two soundness bugs in split-wave64 mask liveness (crates/xcl/src/gpu/recomp/x64_masks.rs), applied symmetrically to both uses_with_table and uses_fallback:

  1. S_MOVREL* with SSRC0 == 251 (SRC_VCCZ) or 252 (SRC_EXECZ): computes let raw = ...; let src = raw.min(124); and unions scalar_code(raw, 1) alongside range(src, 124 - src) so S_MOVRELD_B32 / S_MOVRELD_B64 reading SRC_VCCZ mark VCC whole-live instead of clamping 251 to range(124, 0) == 0 (and without setting spurious bit 125 when SSRC0 == 124).
  2. ENC_VOP3 / VOP3_SDST_ENC per-lane mask consumers with SRC2 == 251 (SRC_VCCZ) or 252 (SRC_EXECZ): adds is_per_lane_mask to DynOp (with the matching check in uses_fallback) so V_CNDMASK_B32, V_ADD_CO_CI_U32, V_SUB_CO_CI_U32, and V_SUBREV_CO_CI_U32 keep VCC / EXEC whole-live when SRC2 is 251 / 252, while keeping lane-local SGPR and VCC (106) mask pairs omitted from whole.
  3. Unit tests: adds s_movreld_with_src_vccz_marks_vcc_whole_live and vop3_per_lane_mask_ops_with_src_vccz_mark_vcc_whole_live (with uses vs uses_fallback parity checks), adds a guard test sdwa_vop2_carry_always_overwrites_vcc_even_with_omod_bit47 verifying ENC_VOP2 carry-out SDWA (VOP2_VOP_SDWA, even with OMOD = 2 setting bit 47) still overwrites only VCC, and extends use_plan_matches_fallback_across_all_rdna2_instructions to Variant::Sdwa across ENC_VOP1, ENC_VOP2, and ENC_VOPC.

Part of #675
Part of #1833
Part of #1269

Tested

  • Failing-first check on unmodified origin/main (b49be183) with the new tests (cargo test -p xcl --lib gpu::recomp::x64_masks:: -- --test-threads=1 --nocapture): 20 passed, 2 failed (s_movreld_with_src_vccz_marks_vcc_whole_live, vop3_per_lane_mask_ops_with_src_vccz_mark_vcc_whole_live), 1 ignored (bench_whole_live_out); the sdwa_vop2_carry_always_overwrites_vcc_even_with_omod_bit47 guard passed.
  • Post-fix targeted release tests on NVIDIA GeForce RTX 4060 (cargo test --release -p xcl --lib gpu::recomp::x64_masks:: -- --test-threads=1 --nocapture): 22 passed, 0 failed, 1 ignored (bench_whole_live_out), 0 skipped.
  • Post-fix targeted release tests on WARP (XCL_ADAPTER=warp, XCL_WARP=1, cargo test --release -p xcl --lib gpu::recomp::x64_masks:: -- --test-threads=1 --nocapture): 22 passed, 0 failed, 1 ignored (bench_whole_live_out), 0 skipped.
  • Full release workspace on NVIDIA GeForce RTX 4060 (cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture): 37 test binaries (36 compiled + 1 doc-test), 1438 passed, 0 failed, 47 ignored, 29 SKIPPED lines:
    • 21 no wave64 on wave32-only RTX 4060 (dispatch_chain_native_wave64_builds_whole, 4 in gpu::recomp::lower, 14 in gpu::recomp::lower_dxil, 2 in gpu::recomp::tests)
    • 3 per-lane form: refused in gpu::recomp::lower_dxil (f16 arithmetic, f16 packed, f32 conversions on wave32)
    • 3 D3D12 debug layer unavailable (no d3d12SDKLayers.dll x2, uploads_start_from_each_subresources_state)
    • 1 cannot disable the driver cache (shaders::tests::pso_measurement_compiles_an_exact_synthetic_record)
    • 1 no heap windows (heap_window_out_of_memory_falls_back_to_the_switch_form)

Regression run

Paired 60-second smoke runs on NVIDIA GeForce RTX 4060 against origin/main (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7):

PR head:

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

Base (origin/main):

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

Both runs exit 0x0 with steady 60 60 60 presents per 2 s, 0 device removals, and 0 crashes (1557 vs 1533 frames; peak commit 13969 MB vs 14018 MB).

Not tested

  • Native wave64 GPU hardware tests (RTX 4060 is wave32-only; 21 wave64 GPU tests skipped).
  • D3D12 debug-layer tests (d3d12SDKLayers.dll is not installed on this host; 3 tests skipped).
  • bench_whole_live_out (manual --ignored release benchmark) and the other 46 #[ignore] tests.
  • emit.rs code generation for S_MOVREL* SSRC0=251 (intentionally out of scope for this liveness-only fix).

AI use

Written and verified with Google Antigravity (Gemini 4 Neon). Every change in x64_masks.rs, the failing-first reproducer, the release RTX 4060 / WARP / full workspace test runs, and the paired 60 s smoke runs were verified locally.

<!-- greyfinch-sync:ivall/xcl:issue:5502144615 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2597). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T01:16:50Z. --- **What is in it** Fixes two soundness bugs in split-wave64 mask liveness (`crates/xcl/src/gpu/recomp/x64_masks.rs`), applied symmetrically to both `uses_with_table` and `uses_fallback`: 1. **`S_MOVREL*` with `SSRC0 == 251` (`SRC_VCCZ`) or `252` (`SRC_EXECZ`):** computes `let raw = ...; let src = raw.min(124);` and unions `scalar_code(raw, 1)` alongside `range(src, 124 - src)` so `S_MOVRELD_B32` / `S_MOVRELD_B64` reading `SRC_VCCZ` mark `VCC` whole-live instead of clamping `251` to `range(124, 0) == 0` (and without setting spurious bit 125 when `SSRC0 == 124`). 2. **`ENC_VOP3` / `VOP3_SDST_ENC` per-lane mask consumers with `SRC2 == 251` (`SRC_VCCZ`) or `252` (`SRC_EXECZ`):** adds `is_per_lane_mask` to `DynOp` (with the matching check in `uses_fallback`) so `V_CNDMASK_B32`, `V_ADD_CO_CI_U32`, `V_SUB_CO_CI_U32`, and `V_SUBREV_CO_CI_U32` keep `VCC` / `EXEC` whole-live when `SRC2` is `251` / `252`, while keeping lane-local SGPR and `VCC` (`106`) mask pairs omitted from `whole`. 3. **Unit tests:** adds `s_movreld_with_src_vccz_marks_vcc_whole_live` and `vop3_per_lane_mask_ops_with_src_vccz_mark_vcc_whole_live` (with `uses` vs `uses_fallback` parity checks), adds a guard test `sdwa_vop2_carry_always_overwrites_vcc_even_with_omod_bit47` verifying `ENC_VOP2` carry-out SDWA (`VOP2_VOP_SDWA`, even with `OMOD = 2` setting bit 47) still overwrites only `VCC`, and extends `use_plan_matches_fallback_across_all_rdna2_instructions` to `Variant::Sdwa` across `ENC_VOP1`, `ENC_VOP2`, and `ENC_VOPC`. Part of #675 Part of #1833 Part of #1269 **Tested** - Failing-first check on unmodified `origin/main` (`b49be183`) with the new tests (`cargo test -p xcl --lib gpu::recomp::x64_masks:: -- --test-threads=1 --nocapture`): 20 passed, 2 failed (`s_movreld_with_src_vccz_marks_vcc_whole_live`, `vop3_per_lane_mask_ops_with_src_vccz_mark_vcc_whole_live`), 1 ignored (`bench_whole_live_out`); the `sdwa_vop2_carry_always_overwrites_vcc_even_with_omod_bit47` guard passed. - Post-fix targeted release tests on NVIDIA GeForce RTX 4060 (`cargo test --release -p xcl --lib gpu::recomp::x64_masks:: -- --test-threads=1 --nocapture`): 22 passed, 0 failed, 1 ignored (`bench_whole_live_out`), 0 skipped. - Post-fix targeted release tests on WARP (`XCL_ADAPTER=warp`, `XCL_WARP=1`, `cargo test --release -p xcl --lib gpu::recomp::x64_masks:: -- --test-threads=1 --nocapture`): 22 passed, 0 failed, 1 ignored (`bench_whole_live_out`), 0 skipped. - Full release workspace on NVIDIA GeForce RTX 4060 (`cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture`): 37 test binaries (36 compiled + 1 doc-test), 1438 passed, 0 failed, 47 ignored, 29 `SKIPPED` lines: - 21 `no wave64` on wave32-only RTX 4060 (`dispatch_chain_native_wave64_builds_whole`, 4 in `gpu::recomp::lower`, 14 in `gpu::recomp::lower_dxil`, 2 in `gpu::recomp::tests`) - 3 `per-lane form: refused` in `gpu::recomp::lower_dxil` (f16 arithmetic, f16 packed, f32 conversions on wave32) - 3 D3D12 debug layer unavailable (`no d3d12SDKLayers.dll` x2, `uploads_start_from_each_subresources_state`) - 1 `cannot disable the driver cache` (`shaders::tests::pso_measurement_compiles_an_exact_synthetic_record`) - 1 `no heap windows` (`heap_window_out_of_memory_falls_back_to_the_switch_form`) **Regression run** Paired 60-second smoke runs on NVIDIA GeForce RTX 4060 against `origin/main` (`b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`): PR head: ``` xcl-smoke v1 commit: 76ae89623c570f5d5bfc1b37115dd0451050d24a gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1557 (PresentX 1557) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13969 MB ``` Base (`origin/main`): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1533 (PresentX 1533) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14018 MB ``` Both runs exit `0x0` with steady `60 60 60` presents per 2 s, 0 device removals, and 0 crashes (1557 vs 1533 frames; peak commit 13969 MB vs 14018 MB). **Not tested** - Native wave64 GPU hardware tests (RTX 4060 is wave32-only; 21 wave64 GPU tests skipped). - D3D12 debug-layer tests (`d3d12SDKLayers.dll` is not installed on this host; 3 tests skipped). - `bench_whole_live_out` (manual `--ignored` release benchmark) and the other 46 `#[ignore]` tests. - `emit.rs` code generation for `S_MOVREL*` `SSRC0=251` (intentionally out of scope for this liveness-only fix). **AI use** Written and verified with Google Antigravity (Gemini 4 Neon). Every change in `x64_masks.rs`, the failing-first reproducer, the release RTX 4060 / WARP / full workspace test runs, and the paired 60 s smoke runs were verified locally.
DavidM1911 commented 2026-11-26 02:08:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T01:20:16Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7179672756 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2597#issuecomment-7179672756). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T01:20:16Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
DarkPanda69 commented 2026-11-26 02:08:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-26T01:34:32Z.


Native wave64 run (listed as untested; 21 wave64 GPU tests skipped on the RTX 4060) on an AMD RX 9070 XT, plus an RTX 3060: the 3 new tests pass, and nothing else changes in the GPU suite.

Head 76ae896 applied on main b49be18, debug, Windows 11 Pro 26200, cargo test -p xcl --lib -- gpu:: --test-threads=4 on main and with the PR, card chosen with XCL_ADAPTER:

main this PR
RX 9070 XT (RDNA4, 32.0.32029.2010) 708 passed, 2 failed, 6 SKIPPED 711 passed, 2 failed, 6 SKIPPED
RTX 3060 (32.0.16.1088) 710 passed, 0 failed, 24 SKIPPED 713 passed, 0 failed, 24 SKIPPED

On both cards, the only result changes against main are the new s_movreld_with_src_vccz_marks_vcc_whole_live, sdwa_vop2_carry_always_overwrites_vcc_even_with_omod_bit47 and vop3_per_lane_mask_ops_with_src_vccz_mark_vcc_whole_live, all ok, with no new skips. On the RX 9070 XT, the wave64 GPU tests that skip on a 32-lane card ran with this PR and still pass. The 2 RX 9070 XT failures are the AMD fuzz seeds tracked in #2115, the same on main.

Not tested: the D3D12 debug-layer tests (no d3d12SDKLayers.dll here either), Intel, a title.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7179909694 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2597#issuecomment-7179909694). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-26T01:34:32Z. --- Native wave64 run (listed as untested; 21 wave64 GPU tests skipped on the RTX 4060) on an AMD RX 9070 XT, plus an RTX 3060: the 3 new tests pass, and nothing else changes in the GPU suite. Head `76ae896` applied on `main` `b49be18`, debug, Windows 11 Pro 26200, `cargo test -p xcl --lib -- gpu:: --test-threads=4` on `main` and with the PR, card chosen with `XCL_ADAPTER`: | | `main` | this PR | |---|---|---| | RX 9070 XT (RDNA4, 32.0.32029.2010) | 708 passed, 2 failed, 6 SKIPPED | 711 passed, 2 failed, 6 SKIPPED | | RTX 3060 (32.0.16.1088) | 710 passed, 0 failed, 24 SKIPPED | 713 passed, 0 failed, 24 SKIPPED | On both cards, the only result changes against `main` are the new `s_movreld_with_src_vccz_marks_vcc_whole_live`, `sdwa_vop2_carry_always_overwrites_vcc_even_with_omod_bit47` and `vop3_per_lane_mask_ops_with_src_vccz_mark_vcc_whole_live`, all ok, with no new skips. On the RX 9070 XT, the wave64 GPU tests that skip on a 32-lane card ran with this PR and still pass. The 2 RX 9070 XT failures are the AMD fuzz seeds tracked in #2115, the same on `main`. Not tested: the D3D12 debug-layer tests (no `d3d12SDKLayers.dll` here either), Intel, a title. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Kalmarv commented 2026-11-29 00:42:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T00:42:03Z.


merge-check
base: fa204595a4
head: 76ae89623c
merge: clean (trial merge 085981a8c9755927bc00a95666d577d0070ab9a1, local, not pushed; git diff --check clean)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> 2611 passed, 0 failed, 49 ignored; SKIPPED: 26 (21 no wave64 on this 32-lane GPU, 3 per-lane f16/f32 forms refused (#1426 semantics), 2 no heap windows); failing: none. All 22 x64_masks::tests ran and passed, including the 3 new ones and use_plan_matches_fallback_across_all_rdna2_instructions with its new SDWA cases.
review: none blocking; whole diff read (x64_masks.rs only). SRC_VCCZ (251) and SRC_EXECZ (252) summarise the whole wave. As the per-lane-mask SRC2 of V_CNDMASK_B32 / V_*_CO_CI_U32 (VOP3), they now mark VCC / EXEC whole-live, in both the use-plan table (is_per_lane_mask) and uses_fallback. VCC (106) and an SGPR pair in SRC2 stay lane-local, as before, and the tests check both. S_MOVREL* now also counts its encoded SSRC0 through scalar_code, so 251 reads VCC and 252 reads EXEC. Because scalar_code(124, 1) is M0 alone, the test checks that no stray bit 125 appears. The SDWA VOP2 carry test pins existing behaviour, with no code change: OMOD bit 47 doesn't turn the carry into an SDST. The fuzz loop now also compares table and fallback on random SDWA encodings of VOP1/VOP2/VOPC.
performance: may add a VCC / EXEC exchange to split-wave64 programs that use these rare operand forms; no other change. Not measured. No title run: Recompiler / Tier 1.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (driver 610.74, wave32 only), AMD Ryzen 9 9950X, Windows 11 build 26200; rustc 1.99.0, debug test profile, DXC 1.9.2609 via XCL_DXC_DIR. Claude Code, Claude Opus 5.5: merge, build, suite and full-diff review; this report.

<!-- greyfinch-sync:ivall/xcl:comment:7248291676 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2597#issuecomment-7248291676). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-29T00:42:03Z. --- merge-check base: fa204595a488c60c6c5f905244f0172072c9c2a9 head: 76ae89623c570f5d5bfc1b37115dd0451050d24a merge: clean (trial merge 085981a8c9755927bc00a95666d577d0070ab9a1, local, not pushed; `git diff --check` clean) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> 2611 passed, 0 failed, 49 ignored; SKIPPED: 26 (21 no wave64 on this 32-lane GPU, 3 per-lane f16/f32 forms refused (#1426 semantics), 2 no heap windows); failing: none. All 22 `x64_masks::tests` ran and passed, including the 3 new ones and `use_plan_matches_fallback_across_all_rdna2_instructions` with its new SDWA cases. review: none blocking; whole diff read (`x64_masks.rs` only). SRC_VCCZ (251) and SRC_EXECZ (252) summarise the whole wave. As the per-lane-mask SRC2 of `V_CNDMASK_B32` / `V_*_CO_CI_U32` (VOP3), they now mark VCC / EXEC whole-live, in both the use-plan table (`is_per_lane_mask`) and `uses_fallback`. VCC (106) and an SGPR pair in SRC2 stay lane-local, as before, and the tests check both. `S_MOVREL*` now also counts its encoded SSRC0 through `scalar_code`, so 251 reads VCC and 252 reads EXEC. Because `scalar_code(124, 1)` is M0 alone, the test checks that no stray bit 125 appears. The SDWA VOP2 carry test pins existing behaviour, with no code change: OMOD bit 47 doesn't turn the carry into an SDST. The fuzz loop now also compares table and fallback on random SDWA encodings of VOP1/VOP2/VOPC. performance: may add a VCC / EXEC exchange to split-wave64 programs that use these rare operand forms; no other change. Not measured. No title run: Recompiler / Tier 1. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (driver 610.74, wave32 only), AMD Ryzen 9 9950X, Windows 11 build 26200; rustc 1.99.0, debug test profile, DXC 1.9.2609 via XCL_DXC_DIR. Claude Code, Claude Opus 5.5: merge, build, suite and full-diff review; this report.
fromthemoonx commented 2026-11-29 02:01:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-29T02:01:34Z.


merge-check
base: fa204595a4
head: 76ae89623c
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2611 passed, 0 failed, 49 ignored; SKIPPED: 28 (mostly "no wave64", plus "no heap windows", "no GPU_UPLOAD heaps", "no build ahead"); failing: none (base fa20459 alone here: 2608 passed, 0 failed, 49 ignored)
review: none blocking, after reading the whole diff (x64_masks.rs only). Every change only adds whole-live bits: SRC_VCCZ / SRC_EXECZ as the per-lane SRC2 now read VCC / EXEC whole, and S_MOVREL* reads scalar_code(SSRC0). So it can only keep more exchanges, never drop one; VCC (106) and SGPR pairs in SRC2 stay lane-local. The table and the fallback stay equal (the randomized uses == uses_fallback test also covers the SDWA bit patterns now). gpu::recomp::x64_masks:: (22 tests) passes 3/3. Scratch mutations: dropping the 251/252 case in both paths fails vop3_per_lane_mask_ops_with_src_vccz_mark_vcc_whole_live; dropping scalar_code(raw, 1) from both S_MOVREL paths fails s_movreld_with_src_vccz_marks_vcc_whole_live. Heads-up for whoever merges: this conflicts in x64_masks.rs with #1111 (ready to merge; both add is_per_lane_mask to DynOp and change the same use-plan code), and #1111 still skips SRC2 = 251/252 for per-lane ops, so the second to merge needs a rebase that keeps this fix. Not run: a title.
performance: translation only; at most a few more whole-live bits (more exchanges) in programs that use SRC_VCCZ/EXECZ as a per-lane SRC2 or as S_MOVREL SSRC0, which should be rare. Reasoned, not measured.
verdict: safe to merge
hardware / tool and model: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug / Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:ivall/xcl:comment:7249162692 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2597#issuecomment-7249162692). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-29T02:01:34Z. --- merge-check base: fa204595a488c60c6c5f905244f0172072c9c2a9 head: 76ae89623c570f5d5bfc1b37115dd0451050d24a merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2611 passed, 0 failed, 49 ignored; SKIPPED: 28 (mostly "no wave64", plus "no heap windows", "no GPU_UPLOAD heaps", "no build ahead"); failing: none (base fa20459 alone here: 2608 passed, 0 failed, 49 ignored) review: none blocking, after reading the whole diff (`x64_masks.rs` only). Every change only adds whole-live bits: SRC_VCCZ / SRC_EXECZ as the per-lane SRC2 now read VCC / EXEC whole, and `S_MOVREL*` reads `scalar_code(SSRC0)`. So it can only keep more exchanges, never drop one; VCC (106) and SGPR pairs in SRC2 stay lane-local. The table and the fallback stay equal (the randomized `uses == uses_fallback` test also covers the SDWA bit patterns now). `gpu::recomp::x64_masks::` (22 tests) passes 3/3. Scratch mutations: dropping the 251/252 case in both paths fails `vop3_per_lane_mask_ops_with_src_vccz_mark_vcc_whole_live`; dropping `scalar_code(raw, 1)` from both `S_MOVREL` paths fails `s_movreld_with_src_vccz_marks_vcc_whole_live`. Heads-up for whoever merges: this conflicts in `x64_masks.rs` with #1111 (ready to merge; both add `is_per_lane_mask` to `DynOp` and change the same use-plan code), and #1111 still skips SRC2 = 251/252 for per-lane ops, so the second to merge needs a rebase that keeps this fix. Not run: a title. performance: translation only; at most a few more whole-live bits (more exchanges) in programs that use SRC_VCCZ/EXECZ as a per-lane SRC2 or as `S_MOVREL` SSRC0, which should be rare. Reasoned, not measured. verdict: safe to merge hardware / tool and model: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug / Claude Code (Claude Opus 5.5)
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!2587
No description provided.