mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-27 02:10:43 +00:00
identify() treated SRC0 = 255 as the literal selector in every VOP3 form
with the LITERAL extension, so six interpolation forms (v_interp_p1_f32,
v_interp_p2_f32, v_interp_mov_f32 in VOP3, v_interp_p1ll_f16,
v_interp_p1lv_f16, v_interp_p2_f16) were read as 12 bytes. In these
forms SRC0 is not an operand selector: the RDNA 2 ISA guide, section
10.4.2, says SRC0 "is treated as a set of bit-fields" {attr_word,
attr_chan, attr}, and the XML gives its operand type as OPR_ATTR. LLVM
23.1.6 decodes all six as 8 bytes.
Fields typed OPR_ATTR are now skipped when looking for a literal. VGPR-
only sources are unchanged: LLVM still reads v_permlane16_b32 and
v_movrels_b32 with selector 255 as 12 bytes (invalid operand), and the
new test pins that too. The corpus check's six pinned mismatch rows
are gone: v_interp_mov_f32 now agrees fully and the other five are
operand_flagged (same form and length, LLVM flags the operand).
The new test fails on the old rule.
Fixes #235
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>