upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/main.cpp
diff options
context:
space:
mode:
authorLuiz Neves <luizgustavobenicio@gmail.com>2026-11-21 18:42:15 -0300
committerLuiz Neves <luizgustavobenicio@gmail.com>2026-11-21 18:42:15 -0300
commit02a830f067f98de0fddc910dab3fa9eebb05ca52 (patch)
tree985b8e3a3904b48b37f81f1f647190e2b1277f65 /runtime/src/main.cpp
parent4e390e0871d7265e629b51aca8ff99a15a6a6845 (diff)
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.
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions