compute: accept VCC and EXEC as sources in 64-bit scalar comparisons #3414
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3414
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3412"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Ammmae0x on GitHub · 2026-11-28 23:24 UTC · original
Ammmae0x:compute/salu-cmp64-vcc-exec→main· +335 −7 · 5 files · 2 commits · merged 2026-11-29 08:43 UTCRefs #3226, #2935
The direct C++ compute handler for the four 64-bit SOPC instructions refused VCC (106) and EXEC (126) as 64-bit sources.
scalar64now reads them throughoperand32/pair_highlike any aligned SGPR pair, so VCC and EXEC work as theS0pair (and as theS1pair fors_cmp_eq_u64/s_cmp_lg_u64).M0(124) and odd SGPRs are still refused as 64-bit sources (viapair_high), and VCC / EXEC / M0 are still refused as thes_bitcmp*_b64bit index.Fix: the refusal programs now prime M0 with
s_mov_b32 m0, 0(ands[22:25]in the new test) sorequire_numericdoes not refuse unbound M0 beforepair_highruns;native_compute_ir_dumpadded to the WIN-VERIFY targets sonative_salu_cmp64_iris built.src/gfx1013_direct_compute.inl: drop the VCC/EXEC refusal inscalar64.tests/native_salu_cmp64_check.py: the two obsolete VCC/EXEC refusal controls now useM0(124) with the existing "unsupported wave64 scalar pair" error; the VCC bit-index refusal is unchanged.tests/native_salu_cmp64_vcc_exec_check.py+tests/cmake/native_salu_cmp64_vcc_exec.cmake: new controls/hardware tests (wave64 and wave32, all four ops from both sources, including VCC vs EXEC, EXEC vs literal, high-word / cross-word bit indices >= 32, wrapped indices 65 and 96, 8 negative controls, 6 reference mutants).docs/experiments/native-direct-salu-cmp64.md: document the accepted VCC/EXEC sources.Linux checks (this host, no Windows/DXC):
/tmp/pe-env/bin/python -B tests/form_coverage_check.py: passed/tmp/pe-env/bin/python -B tests/docs_links_check.py: passed (160 files, 682 links)/tmp/pe-env/bin/python -B tests/bidi_controls_check.py: passed (2582 files)py_compileon touched Python files: passed/tmpcopies failed as expected.Windows verification (compile_dxil, native CTest) still pending.
Windows Verification (
667145e8)@Leyukaka on GitHub · 2026-11-29 04:08 UTC · original · approved these changes
Approve
667145e8. Reviewed by reading the diff and the cited sources; nothing built or run here.src/gfx1013_direct_compute.inl: the only change is the removal of the VCC (106) / EXEC (126) refusal inscalar64(:3566-3567onmain; the lambda is:3563-3567at this head).pair_high(:243-251) already treats 106/126 as aligned pairs and reads the high word throughoperand32(i, src + 1)(107/127, accepted at:180-183). This matches the SOPC rule intools/disasm_rdna2.py:2443-2444(src0 is 64-bit for all four ops, src1 only fors_cmp_eq_u64/s_cmp_lg_u64) andSCC = S0.u64 == / != S1.u64(tools/startup/gfx2hlsl.py:11559).m0, odd SGPRs andvcc_hi/exec_hias a pair stay refused bypair_high, and VCC/EXEC/M0 stay refused as the bit index (:3578).main(212d4b5f),tests/native_salu_cmp64_check.py:170-171assert the refusal this PR removes. The PR retargets both tom0with "unsupported wave64 scalar pair" and primesm0(:167), which is needed becauserequire_numericrefuses an unboundm0first (src/gfx1013_compute_native.cpp:1229-1230at this head,:1244-1245onmain)._controls(tests/native_salu_cmp64_vcc_exec_check.py:219-226). The 6 "reference mutants" (:250-259) mutate the Python reference, not the C++. A wrong value on the VCC/EXEC path would be caught only by_hardware. Not covered: the refusal ofvcc_hi(107) /exec_hi(127) asS0.prpreset filter (CMakePresets.json:51) has nonative_salu_*. The non-PR job runsdevwith-E '_hardware$'(.github/workflows/windows.yml:498), so the_hardwareevidence is the author's run in the PR body (5/5, 0 skipped at this head).@@ -3639), #3408 (@@ -3680) and #3409 (@@ -3700) change the same file in other hunks than this one (@@ -3563), and share no test or doc file with this PR.ctest -R '^native_salu_cmp64_vcc_exec_'line indocs/experiments/native-direct-salu-cmp64.md:45is redundant, because:44-R '^native_salu_cmp64_'already matches the new tests.