Repository navigation
Conversation
…ed forms are rejected v_cmp_class_f64 and v_cmpx_class_f64 were intercepted by cmp_class (ty=f64) before reaching cmp_class_f64, so the mask negation/abs rejection and the non-EXEC destination rejection in cmp_class_f64 were never applied. Route them to cmp_class_f64, which validates the mask (no abs/neg) and the destination (vcc or exec for cmpx), fixing two subtests of test_rejected_forms that expected Unsupported. Fixes TEST-853 on coordination thread ItsNotRexed#3796. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Independently verified locally against \4c52ce27: reproduced TEST-853 and confirmed this patch passes \ est_cmp_class_f64\ + \ est_alu_cmp_class_f16_f64\ (10/10), \32\ class tests (23/23), and \compileall. AI-assisted test verification only. |
|
Tested d9d9d12 on macOS 26, Apple Silicon (arm64), CPython 3.15.2, CPU only, no GPU or game data: pass. Checked out the PR head and ran AI-assisted (Claude Code). |
|
Code read + CPU tests, d9d9d12: pass — Full-suite context from the same branch: |
bobcatchris
left a comment
There was a problem hiding this comment.
Verified at d9d9d12 on a clean checkout (Windows, Python 3.12, CPU only):
python -I tests/semantic/test_cmp_class_f64.py— 6/6 OK (main aa2988c: FAILED, failures=2, matching TEST-853). Neighbouringtests/semantic/test_lds_atomics_values.py7/7 OK;python -m compileall -q tools/rdna2spirv.pyclean.- The 3-line change is correct as far as it goes: removing
v_cmp_class_f64/v_cmpx_class_f64from the unifiedcmp_classdispatch makes them reach the oldercmp_class_f64handler attools/rdna2spirv.py:6289, which rejects the negated mask and the non-EXECv_cmpxdestination. Both subtests flip from silently-translating toUnsupported. - Overlap note for the coordinator: #3948 fixes the same TEST-853 subtests at the root (checks moved into the unified
cmp_classfor all three types, the dead f64-only copy deleted, docs row updated — also reviewed and verified here). This PR is the valid minimal alternative; if #3948 lands first, this one should rebase onto it or close rather than re-adding the dead-code path.
Approving the minimal fix as a fallback.
AI-assisted.
|
Tested |
sds-228
left a comment
There was a problem hiding this comment.
Code review of d9d9d12: no issues found with the fix. I confirmed the root cause independently: an earlier dispatch tuple in Gen._insn claims the two f64 class opcodes before the dedicated Gen.cmp_class_f64 validator, so the negated class mask and the non-EXEC v_cmpx destination are accepted by the generic path.
Verification on clean main, with and without this one-line change: tests/semantic/test_cmp_class_f64.py goes from 2 failing subtests to 6/6 passing. The full semantic discovery run goes from 7 failures / 3 errors to 5 failures / 3 errors, and the remaining results are identical in both runs and unrelated to this item (missing external validator, an interpreter gap, and CRLF-sensitive mutation checks in this environment).
AI-assisted (OpenCode).
fix(rdna2spirv): route v_cmp(x)_class_f64 to cmp_class_f64 so malformed forms are rejected
Defect (TEST-853 on coordination thread #3796): two subtests of
tests/semantic/test_cmp_class_f64.py::test_rejected_forms failed on
upstream/main — they expected
Unsupportedfor:... -v2)s4, ...)Root cause: v_cmp_class_f64 / v_cmpx_class_f64 were intercepted by
cmp_class (ty=f64) before reaching cmp_class_f64, so cmp_class_f64's mask
negation/abs rejection and non-EXEC destination rejection were never
applied. Route them to cmp_class_f64, which validates the mask (no abs/neg)
and the destination (vcc or exec for cmpx).
Reproduced on upstream/main (exactly the two flagged subtests failed), then
fixed. All 6 tests in test_cmp_class_f64.py pass, compileall clean, CPU
only, no game files, no GPU.
Fixes TEST-853 on coordination thread #3796.
🤖 Generated with Claude Code