Selector bytes 8-11 gave 0x00. The RDNA2 ISA reference defines them as the sign
bit of a 16-bit half of {S0, S1} repeated over the byte: bit 15, 31, 47 or 63.
The byte's low two bits pick the half (0, 1 in S1; 2, 3 in S0), and the shift
is 15 or 31, so it stays below 32.
test_alu_perm_alignbit.py now covers 8-11 in every result byte, with #211's
probe values.
Both handlers emitted shifts of 32 or more on the side of an OpSelect that is
discarded (v_perm_b32 for every selector byte; v_alignbit_b32 when the shift
is 0). SPIR-V leaves those results undefined, and the semantic interpreter
rejects them, so neither op had a value test. The shifts are now masked; the
selected result is the same for every input.
tests/semantic/test_alu_perm_alignbit.py runs both ops against plain-Python
references: every defined v_perm_b32 selector (0-7, 0x0c, above 0x0c, per
LLVM's AMDGPUISD::PERM known-bits) in every byte, and every v_alignbit_b32
shift including masking above 31. Selectors 8-11 are left untested. The
interpreter gains OpUGreaterThanEqual, which v_perm_b32 uses.
AI-assisted (Claude Code).