The GFX10 constant-bus limit of v_lshlrev_b64, v_lshrrev_b64 and
v_ashrrev_i64 is one, not two: llvm-mc and COMGR reject
`v_lshrrev_b64 v[2:3], 0x12345678, s[4:5]` and `..., s4, s[6:7]`.
With an SGPR pair as S1 the generator now takes a VGPR or an inline
constant as the shift count, and the reference raises RefError on a
second scalar value.
The reference also ran `s_mov_b32 s4, 1 clamp` (and a v_cmp or
v_cndmask with clamp) because those return before the clamp check.
The check now comes first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No fuzzer generated v_add_nc_i32 / v_sub_nc_i32 or v_lshlrev_b64 /
v_lshrrev_b64 / v_ashrrev_i64, and none put clamp on the unsigned
add/sub with a literal. vint_diff now generates:
- clamp on the e64 / VOP3 form of v_add_nc_u32, v_sub_nc_u32,
v_subrev_nc_u32 (saturate to [0, 0xffffffff]) and v_add_nc_i32,
v_sub_nc_i32 (saturate to [0x80000000, 0x7fffffff]), from the
measured "Integer clamp" row of docs/design.md;
- the three 64-bit shifts into a VGPR pair, S1 a VGPR pair (odd first
registers included), an SGPR pair or an integer inline constant
sign-extended to 64 bits. A literal or a float inline constant as S1
is left out: its widening is not measured.
The destination parser, the observed registers and the shrinker's seed
filter now understand register pairs. Six new tests; a paragraph in
docs/shader_validation.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A separate ISA model for 55 integer opcodes (VOP1/VOP2 as e32 and e64, VOP3-only ops, VOPC e64 + v_cndmask) with VGPR, SGPR, inline, float-inline and literal sources within the encoding and constant-bus rules, compared one lane at a time with rdna2spirv run in tests/semantic/spirv_mini_interp.py, optionally with the hardware through tools/hw_oracle. A mask read as data (#293) only with --known.
AI-assisted.