diff options
| author | Størm <52797150+AC-Storm-YT@users.noreply.github.com> | 2026-11-21 16:11:48 -0500 |
|---|---|---|
| committer | Størm <52797150+AC-Storm-YT@users.noreply.github.com> | 2026-11-21 16:13:17 -0500 |
| commit | 6220fd078c6c45420580aeb9566669a134f04135 (patch) | |
| tree | 8f12de08be8cb6e27e837fc5da5f1bdddc5d40b3 /runtime/src/pe_loader.cpp | |
| parent | dcf5f44879ffa7cc1a1b61e284568b03c39d9885 (diff) | |
Translator: keep v_perm_b32 and v_alignbit_b32 shifts below 32, and test both
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).
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions