Recompiler: direct DXIL v_cmp_class_f16 reads the mask half OP_SEL[1] picks (stacked on #1214) #1970

Open
regiumlepidi wants to merge 2 commits from upstream-pr/1980 into main
regiumlepidi commented 2026-11-25 00:21:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by regiumlepidi on 2026-11-25T00:21:13Z.


Stacked on #1214. Part of #1269.

#1214 makes v_cmp_class_f16 read the class mask from the half that OP_SEL[1] picks for SRC1, in the
HLSL path (recomp/emit.rs). The direct RDNA2 -> DXIL translator (XCL_DIRECT_DXIL=1,
gpu/dxil/lower_valu.rs) still read the low half, so the PR's own GPU test fails there
((0,0) instead of (4294967295,0)). This adds the same rule to the direct path.

What is in it

  • first commit: #1214 by @b3IKK, cherry-picked unchanged onto current main (its head predates gpu/dxil/)
  • second commit (the only new code, 3 lines): the vopc f16 class lowering takes the mask with half(self, 1, ub) and shifts that

If #1214 merges first, only the second commit remains; if the author prefers to take it into #1214, this can be closed.

Tested

  • RTX 5070 Ti 16 GB (Blackwell, wave32), driver 617.42, Ryzen 7 9800X3D, Windows 11 26300; Rust 1.100.0, debug
  • cargo test --workspace -- --test-threads=4, default path: 941 passed, 4 failed, 25 ignored (23 SKIPPED GPU tests); the new test passes
  • same with XCL_DIRECT_DXIL=1: 941 passed, 4 failed, 25 ignored (23 SKIPPED); the new test passes
  • the 4 fuzz_validate_and_gpu_* failures are the same on main on this machine (#1905, E_OUTOFMEMORY on this driver)
  • control: gpu_cmp_class_f16_honours_opsel1 with XCL_DIRECT_DXIL=1 on the first commit alone: FAILED (so the second commit is what fixes it)

Regression run
Run by @Toons29 on a retail title, AMD Radeon RX 9070, release build, 60 s (https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7153032151); blocks as posted there. Within the CONTRIBUTING.md limits: frames 100 % of main, no crash, no device removal.

main:

xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1623 (PresentX 1623)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14648 MB

PR:

xcl-smoke v1
commit: 8b5aea71c9e39d89b515c782b15a59e5031c69bf
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1630 (PresentX 1630)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14813 MB

Not tested

  • wave64 (this GPU runs wave32 only)
  • release build, real titles

AI use

  • Claude Code, model Claude Opus 5.5 (Anthropic). The agent wrote the fix, ran the tests above and opened this PR from the regiumlepidi account at the account owner's request.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5482671755 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1980). Originally posted by [regiumlepidi](https://github.com/regiumlepidi) on 2026-11-25T00:21:13Z. --- Stacked on #1214. Part of #1269. #1214 makes `v_cmp_class_f16` read the class mask from the half that OP_SEL[1] picks for SRC1, in the HLSL path (`recomp/emit.rs`). The direct RDNA2 -> DXIL translator (`XCL_DIRECT_DXIL=1`, `gpu/dxil/lower_valu.rs`) still read the low half, so the PR's own GPU test fails there (`(0,0)` instead of `(4294967295,0)`). This adds the same rule to the direct path. **What is in it** - first commit: #1214 by @b3IKK, cherry-picked unchanged onto current `main` (its head predates `gpu/dxil/`) - second commit (the only new code, 3 lines): the vopc f16 class lowering takes the mask with `half(self, 1, ub)` and shifts that If #1214 merges first, only the second commit remains; if the author prefers to take it into #1214, this can be closed. **Tested** - RTX 5070 Ti 16 GB (Blackwell, wave32), driver 617.42, Ryzen 7 9800X3D, Windows 11 26300; Rust 1.100.0, debug - `cargo test --workspace -- --test-threads=4`, default path: 941 passed, 4 failed, 25 ignored (23 SKIPPED GPU tests); the new test passes - same with `XCL_DIRECT_DXIL=1`: 941 passed, 4 failed, 25 ignored (23 SKIPPED); the new test passes - the 4 `fuzz_validate_and_gpu_*` failures are the same on `main` on this machine (#1905, E_OUTOFMEMORY on this driver) - control: `gpu_cmp_class_f16_honours_opsel1` with `XCL_DIRECT_DXIL=1` on the first commit alone: FAILED (so the second commit is what fixes it) **Regression run** Run by @Toons29 on a retail title, AMD Radeon RX 9070, release build, 60 s (https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7153032151); blocks as posted there. Within the CONTRIBUTING.md limits: frames 100 % of `main`, no crash, no device removal. main: ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1623 (PresentX 1623) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14648 MB ``` PR: ``` xcl-smoke v1 commit: 8b5aea71c9e39d89b515c782b15a59e5031c69bf gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1630 (PresentX 1630) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14813 MB ``` **Not tested** - wave64 (this GPU runs wave32 only) - release build, real titles **AI use** - Claude Code, model Claude Opus 5.5 (Anthropic). The agent wrote the fix, ran the tests above and opened this PR from the `regiumlepidi` account at the account owner's request. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DarkPanda69 commented 2026-11-25 01:10:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-25T00:47:27Z.


AMD run with native 64-lane waves, which this PR lists as not tested (the author's GPU runs wave32 only).

Tested: pass, head 8b5aea7 applied on main 6567c5f, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.
cargo test -p xcl --lib -- gpu:: --test-threads=4:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 465 passed, 2 failed, 21 ignored. gpu_cmp_class_f16_honours_opsel1 ok. The 2 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and _3, which fail the same way on main 6567c5f without this PR on this card.
  • NVIDIA RTX 3060, driver 32.0.16.1088: 467 passed, 0 failed, 21 ignored. Same test ok.

Not tested: release build; the whole workspace suite; 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:7148877582 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7148877582). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-25T00:47:27Z. --- AMD run with native 64-lane waves, which this PR lists as not tested (the author's GPU runs wave32 only). **Tested:** pass, head `8b5aea7` applied on `main` `6567c5f`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. `cargo test -p xcl --lib -- gpu:: --test-threads=4`: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 465 passed, 2 failed, 21 ignored. `gpu_cmp_class_f16_honours_opsel1` ok. The 2 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `_3`, which fail the same way on `main` `6567c5f` without this PR on this card. - NVIDIA RTX 3060, driver 32.0.16.1088: 467 passed, 0 failed, 21 ignored. Same test ok. **Not tested:** release build; the whole workspace suite; a title. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
DavidM1911 commented 2026-11-25 04:10:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T03:19:48Z.


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7151812028 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7151812028). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T03:19:48Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 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:42 +00:00 (Migrated from github.com)

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


Arc A770 verification for XCL PR #1980
https://github.com/xcl-dev/xcl/pull/1980

2026-11-25 | STOR-WINLAB | 8b5aea71c9
The PR was open at this head before and after the run. The assigned checkout was clean and detached at the same SHA. Read AGENTS.md and CONTRIBUTING.md, which match the previous checkout. The PR lists an RTX 5070 Ti author run and has two existing reports covering AMD and NVIDIA. Its conversation, inline comments, reviews, and a repository search for the exact fixture with A770 showed no Arc duplicate. The overlapping PR #1214 is the stated HLSL prerequisite.

Tested

Windows 11 Enterprise Evaluation 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175. Rust and Cargo 1.100.0 (x86_64-pc-windows-msvc). Both runs logged dxcompiler and DXIL 1.9.2609.5. The test profile was unoptimized with debug info disabled.

Prebuilt outside the Arc mutex with cargo test --locked -p xcl --lib --no-run (exit 0, 40.06 s). CARGO_TARGET_DIR=L:/XclTooling/pr2014-1c971de6/target, CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0. XCL_ADAPTER=A770 and XCL_DXC_DIR=$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64. TEMP and TMP used build-temp, test-0-temp, or test-1-temp under L:/XclTooling/pr1980.

Each invocation below ran in its own powershell.exe -NoProfile -ExecutionPolicy RemoteSigned process, with the indicated XCL_DIRECT_DXIL setting and separate stdout and stderr logs from process start.

$env:XCL_DIRECT_DXIL='0'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
    & 'L:/XclTooling/pr2014-1c971de6/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' 'gpu::recomp::tests::gpu_cmp_class_f16_honours_opsel1' --exact --nocapture --test-threads=1
}

$env:XCL_DIRECT_DXIL='1'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
    & 'L:/XclTooling/pr2014-1c971de6/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' 'gpu::recomp::tests::gpu_cmp_class_f16_honours_opsel1' --exact --nocapture --test-threads=1
}

HLSL + DXC (0) and direct DXIL (1) each exited 0 with 1 passed, 0 failed, 0 ignored, 0 measured, 969 filtered out, and 0.19 s elapsed. Total 2 passed, 0 failed, 0 ignored, 0 skips. Neither stream contained a skip notice. The fixture selects direct DXIL without fallback for setting 1.

Both processes exercised native wave32. The earlier #2089 capability probe on this host and driver measured a wave lane range of 8–32. At this revision the fixture's gpu_waves() helper adds wave64 only when hardware supports it natively.

The synthetic program used v0=0x00003C00 (low FP16 +1.0), v1=0x01000000 (high positive-normal class mask 0x0100, low mask 0), and v2=0x3C000000 (high FP16 +1.0, low +0.0). Each backend asserted (SGPR low, high) masks of (0xFFFFFFFF, 0) for OP_SEL=2 (low SRC0, high SRC1), (0, 0) for OP_SEL=0 (both low), and (0xFFFFFFFF, 0) for OP_SEL=3 (both high).

Build and test stdout/stderr logs are in L:/XclTooling/pr1980. Both wrappers logged lock release. The final Arc mutex release was at 04:53:08 CET and the target slot L:/XclTooling/pr2014-1c971de6/target is released for reuse.

Not tested

Other fixtures or FP16 classes, native or split wave64, other adapters, release builds, the workspace suite, fuzz tests, ancestor controls, and real-title smoke tests.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the fixture in both backends, inspected its assertions and the logs, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7152347229 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7152347229). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T03:54:15Z. --- Arc A770 verification for XCL PR #1980 https://github.com/xcl-dev/xcl/pull/1980 2026-11-25 | STOR-WINLAB | 8b5aea71c9e39d89b515c782b15a59e5031c69bf The PR was open at this head before and after the run. The assigned checkout was clean and detached at the same SHA. Read AGENTS.md and CONTRIBUTING.md, which match the previous checkout. The PR lists an RTX 5070 Ti author run and has two existing reports covering AMD and NVIDIA. Its conversation, inline comments, reviews, and a repository search for the exact fixture with A770 showed no Arc duplicate. The overlapping PR #1214 is the stated HLSL prerequisite. Tested Windows 11 Enterprise Evaluation 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175. Rust and Cargo 1.100.0 (x86_64-pc-windows-msvc). Both runs logged dxcompiler and DXIL 1.9.2609.5. The test profile was unoptimized with debug info disabled. Prebuilt outside the Arc mutex with cargo test --locked -p xcl --lib --no-run (exit 0, 40.06 s). CARGO_TARGET_DIR=L:/XclTooling/pr2014-1c971de6/target, CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0. XCL_ADAPTER=A770 and XCL_DXC_DIR=$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64. TEMP and TMP used build-temp, test-0-temp, or test-1-temp under L:/XclTooling/pr1980. Each invocation below ran in its own powershell.exe -NoProfile -ExecutionPolicy RemoteSigned process, with the indicated XCL_DIRECT_DXIL setting and separate stdout and stderr logs from process start. $env:XCL_DIRECT_DXIL='0' & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & 'L:/XclTooling/pr2014-1c971de6/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' 'gpu::recomp::tests::gpu_cmp_class_f16_honours_opsel1' --exact --nocapture --test-threads=1 } $env:XCL_DIRECT_DXIL='1' & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & 'L:/XclTooling/pr2014-1c971de6/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' 'gpu::recomp::tests::gpu_cmp_class_f16_honours_opsel1' --exact --nocapture --test-threads=1 } HLSL + DXC (0) and direct DXIL (1) each exited 0 with 1 passed, 0 failed, 0 ignored, 0 measured, 969 filtered out, and 0.19 s elapsed. Total 2 passed, 0 failed, 0 ignored, 0 skips. Neither stream contained a skip notice. The fixture selects direct DXIL without fallback for setting 1. Both processes exercised native wave32. The earlier #2089 capability probe on this host and driver measured a wave lane range of 8–32. At this revision the fixture's gpu_waves() helper adds wave64 only when hardware supports it natively. The synthetic program used v0=0x00003C00 (low FP16 +1.0), v1=0x01000000 (high positive-normal class mask 0x0100, low mask 0), and v2=0x3C000000 (high FP16 +1.0, low +0.0). Each backend asserted (SGPR low, high) masks of (0xFFFFFFFF, 0) for OP_SEL=2 (low SRC0, high SRC1), (0, 0) for OP_SEL=0 (both low), and (0xFFFFFFFF, 0) for OP_SEL=3 (both high). Build and test stdout/stderr logs are in L:/XclTooling/pr1980. Both wrappers logged lock release. The final Arc mutex release was at 04:53:08 CET and the target slot L:/XclTooling/pr2014-1c971de6/target is released for reuse. Not tested Other fixtures or FP16 classes, native or split wave64, other adapters, release builds, the workspace suite, fuzz tests, ancestor controls, and real-title smoke tests. AI use T3 Code / Codex (gpt-6.2-sol) ran the fixture in both backends, inspected its assertions and the logs, and wrote this report.
Toons29 commented 2026-11-25 05:08:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T04:38:39Z.


Regression run of 8b5aea71 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on cbc296ab, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1623 (PresentX 1623)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14648 MB
xcl-smoke v1
commit: 8b5aea71c9e39d89b515c782b15a59e5031c69bf
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1630 (PresentX 1630)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14813 MB

Against the limits in CONTRIBUTING.md: 100 % of main's frames, 101 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.

<!-- greyfinch-sync:ivall/xcl:comment:7153032151 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7153032151). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T04:38:39Z. --- Regression run of `8b5aea71` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `cbc296ab`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1623 (PresentX 1623) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14648 MB ``` ``` xcl-smoke v1 commit: 8b5aea71c9e39d89b515c782b15a59e5031c69bf gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1630 (PresentX 1630) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14813 MB ``` Against the limits in CONTRIBUTING.md: 100 % of `main`'s frames, 101 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; a script posted this right after the run, with both blocks exactly as printed.
thehollowedone commented 2026-11-27 20:15:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-27T20:15:07Z.


merge-check
base: 6089122a1c
head: 8b5aea71c9
merge: clean
build: cargo build --workspace -> ok
tests: XCL_ADAPTER=nvidia cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1465 passed, 1 failed, 47 ignored; 25 SKIPPED notices. The sole failure was gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk (DXIL not compiled), also reproduced on untouched main here. The new gpu_cmp_class_f16_honours_opsel1 passed in the workspace run; XCL_DIRECT_DXIL=1 cargo test -p xcl --lib gpu_cmp_class_f16_honours_opsel1 -- --nocapture --test-threads=1 separately passed 1/1 with no skip.
review: AMD's RDNA2 ISA §6.2.5 excludes VOPC instructions encoded as VOP3 from OPSEL, and LLVM's GFX1030 syntax lists v_cmp_class_f16_e64 without op_sel but v_cmp_class_f16_sdwa with src1_sel. The added test encodes V_CMP_CLASS_F16 as VOP3 with OP_SEL=2/3; both changed emitters produce its expected value by construction. It compares neither result with the original RDNA2 instruction. For documented encodings with OP_SEL=0, the class decision uses only mask bits 0–9, so the new SRC1 half extraction does not change the decision. This also affects prerequisite #1214.
performance: not measured; both paths add a mask/extract operation to this compare, whose effect on generated DXIL was not measured.
verdict: not yet: establish native evidence for this exact VOP3 encoding if the title uses a console-specific exception; otherwise replace the unsupported OP_SEL test with documented SDWA src1_sel coverage and reconsider whether either patch is needed.
hardware / tool and model: NVIDIA RTX 3080 Ti 12 GiB, driver 621.35; Ryzen 7 9800X3D; Windows 11 build 26300; rustc 1.99.1 MSVC; DXC 1.8.2502.11. Codex (GPT-6.2 Sol) ran the build and tests, checked the diff and drafted this report; Codex (GPT-6.2 Astra) independently reviewed the instruction semantics.

<!-- greyfinch-sync:ivall/xcl:comment:7227321698 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7227321698). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-27T20:15:07Z. --- merge-check base: 6089122a1c96dff16e93b6fdf04c8ed20cfb6102 head: 8b5aea71c9e39d89b515c782b15a59e5031c69bf merge: clean build: `cargo build --workspace` -> ok tests: `XCL_ADAPTER=nvidia cargo test --workspace --no-fail-fast -- --test-threads=4` -> 1465 passed, 1 failed, 47 ignored; 25 `SKIPPED` notices. The sole failure was `gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk` (`DXIL not compiled`), also reproduced on untouched `main` [here](https://github.com/xcl-dev/xcl/pull/671#issuecomment-7223888221). The new `gpu_cmp_class_f16_honours_opsel1` passed in the workspace run; `XCL_DIRECT_DXIL=1 cargo test -p xcl --lib gpu_cmp_class_f16_honours_opsel1 -- --nocapture --test-threads=1` separately passed 1/1 with no skip. review: AMD's [RDNA2 ISA §6.2.5](https://docs.amd.com/api/khub/documents/Et~wpu9g~Ffl7d9q0QZ~Og/content) excludes VOPC instructions encoded as VOP3 from `OPSEL`, and [LLVM's GFX1030 syntax](https://rocmdocs.amd.com/projects/llvm-project/en/latest/LLVM/llvm/html/AMDGPU/AMDGPUAsmGFX1030.html) lists `v_cmp_class_f16_e64` without `op_sel` but `v_cmp_class_f16_sdwa` with `src1_sel`. The added test encodes `V_CMP_CLASS_F16` as VOP3 with `OP_SEL=2/3`; both changed emitters produce its expected value by construction. It compares neither result with the original RDNA2 instruction. For documented encodings with `OP_SEL=0`, the class decision uses only mask bits 0–9, so the new SRC1 half extraction does not change the decision. This also affects prerequisite #1214. performance: not measured; both paths add a mask/extract operation to this compare, whose effect on generated DXIL was not measured. verdict: not yet: establish native evidence for this exact VOP3 encoding if the title uses a console-specific exception; otherwise replace the unsupported `OP_SEL` test with documented SDWA `src1_sel` coverage and reconsider whether either patch is needed. hardware / tool and model: NVIDIA RTX 3080 Ti 12 GiB, driver 621.35; Ryzen 7 9800X3D; Windows 11 build 26300; rustc 1.99.1 MSVC; DXC 1.8.2502.11. Codex (GPT-6.2 Sol) ran the build and tests, checked the diff and drafted this report; Codex (GPT-6.2 Astra) independently reviewed the instruction semantics.
throny commented 2026-11-27 20:17:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T20:17:41Z.


merge-check claim
head: 8b5aea71c9

<!-- greyfinch-sync:ivall/xcl:comment:7227363216 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7227363216). Originally posted by [throny](https://github.com/throny) on 2026-11-27T20:17:41Z. --- merge-check claim head: 8b5aea71c9e39d89b515c782b15a59e5031c69bf
throny commented 2026-11-27 20:32:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T20:32:05Z.


merge-check
base: 6089122a
head: 8b5aea71c9
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored
review: no defect. Both paths now read the half of SRC1 that OP_SEL[1] selects, which agrees with the spec table's 16-bit SRC1 for this instruction (hardware behaviour not verified here). The test fails without the change; it covers the direct-DXIL path only when XCL_DIRECT_DXIL=1 is set. Note: it contains #1214's commit, which is still open: merge one, close the other.
performance: one extra AND or shift per class compare. It changes both the HLSL and the direct-DXIL translator sources: every tester re-translates once.
verdict: not yet: I withdraw my safe to merge. The other check on this head points to AMD's ISA text, which excludes compare instructions in the three-operand encoding from OP_SEL; my review only compared the change with the operand-size table and did not verify the hardware behaviour, so that evidence is the stronger one. Needed: native evidence for this exact encoding, or coverage of the documented SDWA form instead. (Edited after reading that check; build and suite results above are unchanged.)
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7227597475 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7227597475). Originally posted by [throny](https://github.com/throny) on 2026-11-27T20:32:05Z. --- merge-check base: 6089122a head: 8b5aea71c9e39d89b515c782b15a59e5031c69bf merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored review: no defect. Both paths now read the half of SRC1 that OP_SEL[1] selects, which agrees with the spec table's 16-bit SRC1 for this instruction (hardware behaviour not verified here). The test fails without the change; it covers the direct-DXIL path only when XCL_DIRECT_DXIL=1 is set. Note: it contains #1214's commit, which is still open: merge one, close the other. performance: one extra AND or shift per class compare. It changes both the HLSL and the direct-DXIL translator sources: every tester re-translates once. verdict: not yet: I withdraw my `safe to merge`. The other check on this head points to AMD's ISA text, which excludes compare instructions in the three-operand encoding from OP_SEL; my review only compared the change with the operand-size table and did not verify the hardware behaviour, so that evidence is the stronger one. Needed: native evidence for this exact encoding, or coverage of the documented SDWA form instead. (Edited after reading that check; build and suite results above are unchanged.) hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Foniass commented 2026-12-01 07:10:34 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 8b5aea7

Stacked on #1214: the first commit is #1214 cherry-picked unchanged (emit.rs reads the class mask through half(1, &ub)), the second adds the same OP_SEL[1] rule to the direct DXIL path (lower_valu.rs half(self, 1, ub)). Neither is on main yet (main still uses ub.clone() and shifts ub).
No problems found in the diff.
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:7303733588 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1980#issuecomment-7303733588). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:10:34Z. --- **Triage (#1607)** – head 8b5aea7 Stacked on #1214: the first commit is #1214 cherry-picked unchanged (emit.rs reads the class mask through `half(1, &ub)`), the second adds the same OP_SEL[1] rule to the direct DXIL path (lower_valu.rs `half(self, 1, ub)`). Neither is on main yet (main still uses `ub.clone()` and shifts `ub`). No problems found in the diff. 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/1980:upstream-pr/1980'
git switch 'upstream-pr/1980'

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