Commit Graph

1 Commits

Author SHA1 Message Date
02a830f067 Translator: keep the v_alignbyte_b32 shift below 32, and test it
With src2 & 3 == 0 the byte shift is 0 and the left shift of src0 is 32 - 0 =
32, undefined in SPIR-V. Its result is discarded by the OpSelect, but SPIR-V
leaves the shift undefined even there. (32 - b) & 31 keeps it in range, as #201
does for v_alignbit_b32.

tests/semantic/test_alu_alignbyte.py checks every byte shift, the 2-bit
selector mask and an inline selector against a plain-Python reference.
2026-11-21 18:42:15 -03:00