Commit Graph

3 Commits

Author SHA1 Message Date
0f7b01b7cd vrel_diff: harden --ops parsing, compare() lane/word bounds, shrink Skip handling, and RefError checks 2026-11-25 08:26:45 +01:00
e6730c6af8 vrel_diff: reject --programs and --max-ops below 1
A negative or zero --programs reported success without testing a program, and
--max-ops 0 raised a ValueError from randint. Both now exit 2 with an argument
error, as vint_diff and wint_diff do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 09:33:30 +00:00
56af50d2d9 tools/vrel_diff.py: whole-wave fuzzer for the relative VGPR moves; v_movreld_b32 takes any VOP1 source
No fuzzer generated v_movrels_b32, v_movreld_b32, v_movrelsd_b32, v_movrelsd_2_b32,
v_swaprel_b32 or v_swap_b32. vrel_diff runs seeded straight-line programs of them, with M0
and EXEC rewritten between them, through rdna2spirv and spirv_wave_interp and compares all 32
VGPRs of the window in every lane with a per-lane model of the RDNA2 ISA descriptions.

rdna2spirv raised Unsupported for v_movreld_b32 with an SGPR, M0, inline constant or literal
source. Only the destination is indexed, so the source is any VOP1 source (LLVM's
VOP_MOVRELD takes VSrc_b32; llvm-mc 21.1.8 accepts s4, m0, 7, -3, 1.0, a literal, e32 and e64).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 08:56:53 +00:00