Tests: cover Direct DXIL Module::optimize passes and GPU execution #1832

Open
microwave805 wants to merge 1 commit from upstream-pr/1842 into main
microwave805 commented 2026-11-24 21:42:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by microwave805 on 2026-11-24T21:42:47Z.


Add standalone integration and GPU tests for the Direct DXIL module optimizer (crates/xcl/src/gpu/dxil/module/opt.rs), which currently has no dedicated unit or integration tests.

What is in it

  • crates/xcl/tests/gpu_dxil_opt.rs:
    • opt_constant_folding_and_identities_validate_and_run: verifies 32-bit constant folding (AShr, UDiv, URem, SExt, SLt, Add, Xor, Select) and algebraic identities (+0, &~0, *1, *0, x^x, select(c, x, x), bitcast(bitcast(x)), cmp(x, x)), checking DXIL disassembly and wave32 GPU execution against CPU values.
    • opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane: verifies dominator-tree CSE across child blocks, sibling-branch undo-stack isolation, same-block waveActiveBallot CSE without hoisting across a divergent branch (verified on GPU via waveActiveBallot(true) returning odd_mask instead of 0xFFFF_FFFF), and waveIsFirstLane remaining unmerged.
    • opt_prunes_unreachable_blocks_and_collapses_trivial_phis: verifies unreachable-block pruning and second-pass trivial-phi collapse after CSE unifies diamond arms, plus GPU execution.
    • opt_dce_drops_dead_32bit_ops_but_preserves_64bit_flags: verifies DCE removes dead 32-bit ops while retaining dead i64/f64 ops so Int64Ops/Doubles shader flags stay consistent under DXC validation.
    • opt_leaves_malformed_use_before_def_for_writer_to_reject: verifies uses_well_formed leaves malformed forward-reference IR untouched so try_to_bitcode still reports an error.

Tested

  • NVIDIA GeForce RTX 3070 (driver 32.0.16.1742), AMD Ryzen 5 5600X, Windows 11 Pro (build 22631), DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc, debug)
  • On PR head 7753368 (based on main c4d37be):
    • cargo test -p xcl --test gpu_dxil_opt -- --nocapture: 5 passed, 0 failed, 0 ignored (0 skipped)
    • .\scripts\test.ps1 (cargo build --workspace && cargo test --workspace -- --test-threads=4): 964 passed, 0 failed, 43 ignored
    • SKIPPED GPU tests (23 pre-existing, 0 in gpu_dxil_opt): 18× no wave64 (lower::tests, lower_dxil::tests, recomp::tests), 3× per-lane form: refused (lower_dxil::tests: f16 arithmetic, f16 packed, f32 conversions), 1× no heap windows (heap_window_out_of_memory_falls_back_to_the_switch_form), 1× cannot disable the driver cache (shaders::tests::pso_measurement_compiles_an_exact_synthetic_record)

Regression run

  • Not needed: test-only PR adding crates/xcl/tests/gpu_dxil_opt.rs (no runtime or build-input files changed).

Not tested

  • AMD / wave64 GPUs, Intel GPUs, Linux/Wine, and retail titles

AI use

  • Antigravity (Gemini 4 Neon): inspected crates/xcl/src/gpu/dxil/module/opt.rs, wrote crates/xcl/tests/gpu_dxil_opt.rs and this PR description, and ran the verification commands above.
<!-- greyfinch-sync:ivall/xcl:issue:5480824088 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842). Originally posted by [microwave805](https://github.com/microwave805) on 2026-11-24T21:42:47Z. --- Add standalone integration and GPU tests for the Direct DXIL module optimizer (`crates/xcl/src/gpu/dxil/module/opt.rs`), which currently has no dedicated unit or integration tests. **What is in it** - `crates/xcl/tests/gpu_dxil_opt.rs`: - `opt_constant_folding_and_identities_validate_and_run`: verifies 32-bit constant folding (`AShr`, `UDiv`, `URem`, `SExt`, `SLt`, `Add`, `Xor`, `Select`) and algebraic identities (`+0`, `&~0`, `*1`, `*0`, `x^x`, `select(c, x, x)`, `bitcast(bitcast(x))`, `cmp(x, x)`), checking DXIL disassembly and wave32 GPU execution against CPU values. - `opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane`: verifies dominator-tree CSE across child blocks, sibling-branch undo-stack isolation, same-block `waveActiveBallot` CSE without hoisting across a divergent branch (verified on GPU via `waveActiveBallot(true)` returning `odd_mask` instead of `0xFFFF_FFFF`), and `waveIsFirstLane` remaining unmerged. - `opt_prunes_unreachable_blocks_and_collapses_trivial_phis`: verifies unreachable-block pruning and second-pass trivial-phi collapse after CSE unifies diamond arms, plus GPU execution. - `opt_dce_drops_dead_32bit_ops_but_preserves_64bit_flags`: verifies DCE removes dead 32-bit ops while retaining dead `i64`/`f64` ops so `Int64Ops`/`Doubles` shader flags stay consistent under DXC validation. - `opt_leaves_malformed_use_before_def_for_writer_to_reject`: verifies `uses_well_formed` leaves malformed forward-reference IR untouched so `try_to_bitcode` still reports an error. **Tested** - NVIDIA GeForce RTX 3070 (driver 32.0.16.1742), AMD Ryzen 5 5600X, Windows 11 Pro (build 22631), DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`, debug) - On PR head `7753368` (based on `main` `c4d37be`): - `cargo test -p xcl --test gpu_dxil_opt -- --nocapture`: 5 passed, 0 failed, 0 ignored (0 skipped) - `.\scripts\test.ps1` (`cargo build --workspace && cargo test --workspace -- --test-threads=4`): 964 passed, 0 failed, 43 ignored - SKIPPED GPU tests (23 pre-existing, 0 in `gpu_dxil_opt`): 18× `no wave64` (`lower::tests`, `lower_dxil::tests`, `recomp::tests`), 3× `per-lane form: refused` (`lower_dxil::tests`: `f16 arithmetic`, `f16 packed`, `f32 conversions`), 1× `no heap windows` (`heap_window_out_of_memory_falls_back_to_the_switch_form`), 1× `cannot disable the driver cache` (`shaders::tests::pso_measurement_compiles_an_exact_synthetic_record`) **Regression run** - Not needed: test-only PR adding `crates/xcl/tests/gpu_dxil_opt.rs` (no runtime or build-input files changed). **Not tested** - AMD / wave64 GPUs, Intel GPUs, Linux/Wine, and retail titles **AI use** - Antigravity (Gemini 4 Neon): inspected `crates/xcl/src/gpu/dxil/module/opt.rs`, wrote `crates/xcl/tests/gpu_dxil_opt.rs` and this PR description, and ran the verification commands above.
DarkPanda69 commented 2026-11-24 23:08:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-24T22:40:44Z.


AMD run with native 64-lane waves, which this PR lists as not tested, plus an NVIDIA one.

Tested: pass, head 7753368 applied on main 689f2db, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.
cargo test -p xcl --test gpu_dxil_opt -- --test-threads=4 with XCL_ADAPTER set to each GPU:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 5 passed, 0 failed, 0 SKIPPED.
  • NVIDIA RTX 3060, driver 32.0.16.1088, waves 32 only: 5 passed, 0 failed, 0 SKIPPED.

cargo test -p xcl --lib -- gpu::recomp --test-threads=4 with this PR applied: 261 passed, 0 failed, 18 ignored on both; the SKIPPED lines are the same as on main.

Not tested: Intel; Linux / Wine; the whole workspace suite.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7146515780 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7146515780). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-24T22:40:44Z. --- AMD run with native 64-lane waves, which this PR lists as not tested, plus an NVIDIA one. **Tested:** pass, head `7753368` applied on `main` `689f2db`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. `cargo test -p xcl --test gpu_dxil_opt -- --test-threads=4` with `XCL_ADAPTER` set to each GPU: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 5 passed, 0 failed, 0 SKIPPED. - NVIDIA RTX 3060, driver 32.0.16.1088, waves 32 only: 5 passed, 0 failed, 0 SKIPPED. `cargo test -p xcl --lib -- gpu::recomp --test-threads=4` with this PR applied: 261 passed, 0 failed, 18 ignored on both; the SKIPPED lines are the same as on `main`. **Not tested:** Intel; Linux / Wine; the whole workspace suite. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
futurepro62 commented 2026-11-24 23:08:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T22:40:45Z.


Full-suite run, since this PR has no test report yet. Tested exact head 7753368 (on its base c4d37be).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu: 959 passed, 0 failed, 43 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: opt_constant_folding_and_identities_validate_and_run, opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane, opt_prunes_unreachable_blocks_and_collapses_trivial_phis, opt_dce_drops_dead_32bit_ops_but_preserves_64bit_flags, opt_leaves_malformed_use_before_def_for_writer_to_reject.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 964 passed, 0 failed, 43 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • On NVIDIA, --skip leaves out five tests where this PR's base has them. They fail on main 689f2db too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. These are heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7146515963 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7146515963). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T22:40:45Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `7753368` (on its base `c4d37be`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu`: **959 passed, 0 failed, 43 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `opt_constant_folding_and_identities_validate_and_run`, `opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane`, `opt_prunes_unreachable_blocks_and_collapses_trivial_phis`, `opt_dce_drops_dead_32bit_ops_but_preserves_64bit_flags`, `opt_leaves_malformed_use_before_def_for_writer_to_reject`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **964 passed, 0 failed, 43 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - On NVIDIA, `--skip` leaves out five tests where this PR's base has them. They fail on main `689f2db` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. These are `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-25 02:08:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T01:15:28Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7149364028 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7149364028). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T01:15:28Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
JJAutoCompare commented 2026-11-25 04:10:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:22:10Z.


Tested

PR #1842 was open at 775336821f5c95ecb329a4c06a8a5e14670cdac9 before and after testing. The assigned checkout was clean and detached at that SHA for the run. The PR description and three discussion comments showed no equivalent Arc A770 result.

STOR-WINLAB ran Windows 11 Enterprise Evaluation 25H2 (26200.9974), AMD Ryzen 7 3800X, and Intel Arc A770 (driver 32.0.101.9175). Rust and Cargo were 1.100.0, host x86_64-pc-windows-msvc. Each fixture reported DXC and DXIL 1.9.2609.5.

cargo test -p xcl --locked --test gpu_dxil_opt --no-run built successfully outside the GPU mutex. The unoptimized build used CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, and CARGO_PROFILE_TEST_DEBUG=0. CARGO_TARGET_DIR=L:/XclTooling/pr1947-1831ec4-t3-97236edf/target, TEMP=TMP=L:/XclTooling/pr1842/tmp, XCL_ADAPTER=A770, and XCL_DXC_DIR=$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64.

$exe = 'L:/XclTooling/pr1947-1831ec4-t3-97236edf/target/debug/build/xcl/551991fdf0dc4311/out/gpu_dxil_opt-551991fdf0dc4311.exe'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
    & $exe --exact opt_constant_folding_and_identities_validate_and_run --test-threads=1 --nocapture
    & $exe --exact opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane --test-threads=1 --nocapture
    & $exe --exact opt_prunes_unreachable_blocks_and_collapses_trivial_phis --test-threads=1 --nocapture
}

All three exact invocations exited 0. The checked-in DXIL validation and GPU result assertions passed with 3 passed, 0 failed, 0 ignored, 0 hardware skips, and 0 validator skips. The GPU mutex was released and the assigned Cargo target is available.

Not tested

Other fixtures, the workspace suite, retail titles, and other adapters or drivers.

AI use

T3 Code / Codex gpt-6.2-sol ran the commands, checked the logs, and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7151849351 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7151849351). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T03:22:10Z. --- ## Tested [PR #1842](https://github.com/xcl-dev/xcl/pull/1842) was open at `775336821f5c95ecb329a4c06a8a5e14670cdac9` before and after testing. The assigned checkout was clean and detached at that SHA for the run. The PR description and three discussion comments showed no equivalent Arc A770 result. STOR-WINLAB ran Windows 11 Enterprise Evaluation 25H2 (26200.9974), AMD Ryzen 7 3800X, and Intel Arc A770 (driver 32.0.101.9175). Rust and Cargo were 1.100.0, host `x86_64-pc-windows-msvc`. Each fixture reported DXC and DXIL 1.9.2609.5. `cargo test -p xcl --locked --test gpu_dxil_opt --no-run` built successfully outside the GPU mutex. The unoptimized build used `CARGO_BUILD_JOBS=2`, `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, and `CARGO_PROFILE_TEST_DEBUG=0`. `CARGO_TARGET_DIR=L:/XclTooling/pr1947-1831ec4-t3-97236edf/target`, `TEMP=TMP=L:/XclTooling/pr1842/tmp`, `XCL_ADAPTER=A770`, and `XCL_DXC_DIR=$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64`. ```powershell $exe = 'L:/XclTooling/pr1947-1831ec4-t3-97236edf/target/debug/build/xcl/551991fdf0dc4311/out/gpu_dxil_opt-551991fdf0dc4311.exe' & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & $exe --exact opt_constant_folding_and_identities_validate_and_run --test-threads=1 --nocapture & $exe --exact opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane --test-threads=1 --nocapture & $exe --exact opt_prunes_unreachable_blocks_and_collapses_trivial_phis --test-threads=1 --nocapture } ``` All three exact invocations exited 0. The checked-in DXIL validation and GPU result assertions passed with **3 passed, 0 failed, 0 ignored, 0 hardware skips, and 0 validator skips**. The GPU mutex was released and the assigned Cargo target is available. ## Not tested Other fixtures, the workspace suite, retail titles, and other adapters or drivers. ## AI use T3 Code / Codex `gpt-6.2-sol` ran the commands, checked the logs, and prepared this report.
github-actions[bot] commented 2026-11-28 08:02:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:02:18Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7236320962 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7236320962). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:02:18Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
BBareth commented 2026-11-30 13:11:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T13:11:38Z.


merge-check claim
head: 775336821f

<!-- greyfinch-sync:ivall/xcl:comment:7279488545 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7279488545). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T13:11:38Z. --- merge-check claim head: 775336821f5c95ecb329a4c06a8a5e14670cdac9
BBareth commented 2026-11-30 13:22:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T13:22:09Z.


merge-check
base: 9dfbe3ea66
head: 775336821f
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2890 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. The five new tests in crates/xcl/tests/gpu_dxil_opt.rs passed and ran on the GPU here (no new SKIPPED line): opt_constant_folding_and_identities_validate_and_run, opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane, opt_prunes_unreachable_blocks_and_collapses_trivial_phis, opt_dce_drops_dead_32bit_ops_but_preserves_64bit_flags, opt_leaves_malformed_use_before_def_for_writer_to_reject.
review: no blocking finding; one new test file, every line read, no change outside tests. The tests build small compute kernels through the public Shader / Module API, check the optimized DXIL with the DXC validator and its disassembly, and compare GPU results with values computed on the CPU; they skip through runner::skip_test without DXC or wave32. Two nits, neither blocking: (1) in the last test the assertion err.contains("before") || err.contains("dominat") || !err.is_empty() is always true after expect_err unless the message is empty, so it only pins that emission fails; (2) several checks match disassembly text (", 13 ", "mul i32 ", "-4"), which ties them to the DXC disassembler's formatting.
performance: none at run time; the suite gains five tests (four with a DXC validation, three of them with a GPU run).
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7279744808 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7279744808). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T13:22:09Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: 775336821f5c95ecb329a4c06a8a5e14670cdac9 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2890 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. The five new tests in `crates/xcl/tests/gpu_dxil_opt.rs` passed and ran on the GPU here (no new SKIPPED line): `opt_constant_folding_and_identities_validate_and_run`, `opt_cse_merges_dominators_isolates_siblings_and_keeps_wave_is_first_lane`, `opt_prunes_unreachable_blocks_and_collapses_trivial_phis`, `opt_dce_drops_dead_32bit_ops_but_preserves_64bit_flags`, `opt_leaves_malformed_use_before_def_for_writer_to_reject`. review: no blocking finding; one new test file, every line read, no change outside tests. The tests build small compute kernels through the public `Shader` / `Module` API, check the optimized DXIL with the DXC validator and its disassembly, and compare GPU results with values computed on the CPU; they skip through `runner::skip_test` without DXC or wave32. Two nits, neither blocking: (1) in the last test the assertion `err.contains("before") || err.contains("dominat") || !err.is_empty()` is always true after `expect_err` unless the message is empty, so it only pins that emission fails; (2) several checks match disassembly text (`", 13 "`, `"mul i32 "`, `"-4"`), which ties them to the DXC disassembler's formatting. performance: none at run time; the suite gains five tests (four with a DXC validation, three of them with a GPU run). verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
saintwolf commented 2026-11-30 14:33:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T14:33:06Z.


merge-check claim
head: 775336821f

<!-- greyfinch-sync:ivall/xcl:comment:7281553659 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7281553659). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T14:33:06Z. --- merge-check claim head: 775336821f5c95ecb329a4c06a8a5e14670cdac9
saintwolf commented 2026-11-30 14:38:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T14:38:53Z.


merge-check
base: 9dfbe3ea66
head: 775336821f
merge: clean (trial merge fba15a10037e364b4a0b746400730c984ae16408; git diff --check clean; +350/-0 in crates/xcl/tests/gpu_dxil_opt.rs)
build: cargo build --workspace -> ok (39 pre-existing warnings, none from the PR's files)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2890 passed, 1 failed, 51 ignored (lib 2737/1/31, integration 153/0/20); SKIPPED: 27 (22 "no wave64" — wave32-only GPU, 2 "no heap windows", 1 "cannot disable the driver cache (Developer Mode)", 2 "no xgameruntime.dll"); failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, pre-existing on this machine (fails identically on base 9dfbe3ea, same "2D D16 resinfo clobbered v2/v3" assertion); all five new gpu_dxil_opt tests ran on this GPU (four with wave32 execution, one pure IR) and pass
review: test-only, one new integration test file, read in full; no unsafe, no new dependencies, existing public API only (build-confirmed). Minor nits, nothing blocking: opt_leaves_malformed_use_before_def_for_writer_to_reject's final assertion (err.contains("before") || err.contains("dominat") || !err.is_empty()) is nearly tautological via the third disjunct — any non-empty error passes; opt_constant_folding pins the folded constant via dis.contains("-4"), which is disassembly-format-dependent but fine as a pin.
performance: none; tests only.
verdict: safe to merge
hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0, DXC 1.8.2502.11 (23992152) / OpenCode, Qwen 3.8 27B

<!-- greyfinch-sync:ivall/xcl:comment:7281706301 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7281706301). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T14:38:53Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: 775336821f5c95ecb329a4c06a8a5e14670cdac9 merge: clean (trial merge fba15a10037e364b4a0b746400730c984ae16408; git diff --check clean; +350/-0 in crates/xcl/tests/gpu_dxil_opt.rs) build: cargo build --workspace -> ok (39 pre-existing warnings, none from the PR's files) tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2890 passed, 1 failed, 51 ignored (lib 2737/1/31, integration 153/0/20); SKIPPED: 27 (22 "no wave64" — wave32-only GPU, 2 "no heap windows", 1 "cannot disable the driver cache (Developer Mode)", 2 "no xgameruntime.dll"); failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, pre-existing on this machine (fails identically on base 9dfbe3ea, same "2D D16 resinfo clobbered v2/v3" assertion); all five new gpu_dxil_opt tests ran on this GPU (four with wave32 execution, one pure IR) and pass review: test-only, one new integration test file, read in full; no unsafe, no new dependencies, existing public API only (build-confirmed). Minor nits, nothing blocking: opt_leaves_malformed_use_before_def_for_writer_to_reject's final assertion (err.contains("before") || err.contains("dominat") || !err.is_empty()) is nearly tautological via the third disjunct — any non-empty error passes; opt_constant_folding pins the folded constant via dis.contains("-4"), which is disassembly-format-dependent but fine as a pin. performance: none; tests only. verdict: safe to merge hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0, DXC 1.8.2502.11 (23992152) / OpenCode, Qwen 3.8 27B
Foniass commented 2026-12-01 06:57:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:57:44Z.


Triage (#1607) – head 7753368

No open or merged PR adds integration tests of Module::optimize (crates/xcl/tests/gpu_dxil_opt.rs is new). #3269 and #3268, merged since, changed the optimizer, so the disassembly assertions need a rerun on current main.
In opt_leaves_malformed_use_before_def_for_writer_to_reject, the assertion err.contains("before") || err.contains("dominat") || !err.is_empty() is always true once expect_err passes, so it checks nothing about the error.
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:7303483610 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1842#issuecomment-7303483610). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:57:44Z. --- **Triage (#1607)** – head 7753368 No open or merged PR adds integration tests of `Module::optimize` (`crates/xcl/tests/gpu_dxil_opt.rs` is new). #3269 and #3268, merged since, changed the optimizer, so the disassembly assertions need a rerun on current main. In `opt_leaves_malformed_use_before_def_for_writer_to_reject`, the assertion `err.contains("before") || err.contains("dominat") || !err.is_empty()` is always true once `expect_err` passes, so it checks nothing about the error. 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/1842:upstream-pr/1842'
git switch 'upstream-pr/1842'

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/1842'
git switch 'upstream-pr/1842'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1842'
git switch 'upstream-pr/1842'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1842'
git switch 'main'
git merge --squash 'upstream-pr/1842'
git switch 'main'
git merge --ff-only 'upstream-pr/1842'
git switch 'main'
git merge 'upstream-pr/1842'
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!1832
No description provided.