Repository navigation
Conversation
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Verified on Windows 11 (Python 3.14.7).
- Hardens validation for 16-bit integer three-operand instructions (\�_min3_i16/u16, \�_max3_i16/u16, \�_med3_i16/u16):
- Validates VGPR destinations across both \dhi=0\ and \dhi=1.
- Rejects illegal operand modifiers (
eg, \�bs, \sext), DPP, and SDWA forms while preserving valid 16-bit modifiers (\op_sel, \clamp).
- All 7 tests in \ ests/semantic/test_int16_minmax_med3_validation.py\ pass cleanly.
- Clean-room check and \git diff --check\ pass.
LGTM!
|
Verified head
Small PR-body heads-up: the first line of the PR description says No game files used. AI-assisted. |
|
AMD RDNA2 GPU-suite check of Same per-fixture results as main: 247 translated, 247 pass spirv-val; 224/241 passed, 17 skipped, 0 failed on both. No fixture changes status (this suite has no fixture aimed at the new rule, so the rule itself is covered only by the semantic test). |
|
Tested
Not run: the full |
Closes #8683 (claim: #8683 (comment)).
Summary
Hardens operand and modifier validation for the six RDNA2 16-bit integer three-operand min/max/median instructions (�_min3_i16, �_min3_u16, �_max3_i16, �_max3_u16, �_med3_i16, �_med3_u16) in ools/rdna2spirv.py:
== 1), and rejects
eg, �bs, and sext on �[0..3] (while preserving plain negative integer immediates like -16 and -1).
eg_lo:...,
eg_hi:..., duplicates, and unknown modifiers with Unsupported. Valid _e64, op_sel:..., and clamp forms are preserved.
Tests
Added ests/semantic/test_int16_minmax_med3_validation.py covering negative validation tests across all 6 ops plus positive controls (dhi=0, dhi=1, _e64, clamp, negative integer immediates) verified with spirv-as, spirv-val --target-env vulkan1.2, and spirv_mini_interp:
AI-assisted (Gemini 4 Neon).