diff options
| author | Luiz Neves <luizgustavobenicio@gmail.com> | 2026-11-22 11:11:08 -0300 |
|---|---|---|
| committer | Luiz Neves <luizgustavobenicio@gmail.com> | 2026-11-22 11:54:58 -0300 |
| commit | c49bdcd156faf4024b05bf09cf9669553c2186f1 (patch) | |
| tree | b1e8052e415b6b2759749c3e378ad6bc2e20ff30 /runtime/src/pe_loader.cpp | |
| parent | 6a6704df1592e1dc4a3215ddf1423a78adb52045 (diff) | |
rdna2spirv: a constant used as a lane mask through an SGPR (or in a b32 SOP2 on EXEC) gives each lane its bit
s_mov_b32 s20, 0x3ffffc00; s_and_saveexec_b32 s6, s20 left all lanes on:
mask_src read the SGPR's raw value, the same non-zero constant in every
invocation. The 32-bit bitwise SOP2 ops read constants raw too, so
s_and_b32 exec_lo, exec_lo, 0xff00 (inline or in an SGPR) kept every
lane, and s_mov_b32 exec_lo, sN did the same.
mask_src now takes bit L of an SGPR holds_lane_mask doesn't flag (the
high SGPR of a pair for lanes 32-63 in wave64). In wave32, a bitwise SOP2
on masks (EXEC/VCC destination or a mask source) reads both operands
through mask_src (sop2_b32_srcs), and s_mov_b32 exec_lo/hi from a non-mask
SGPR takes each lane's bit. A real mask is unchanged (0 / ~0 per lane).
tests/semantic/test_mask_src_sgpr_const.py covers saveexec, SOP2 on EXEC
(inline and SGPR), exec_lo from an SGPR, v_cndmask, a wave64 pair and
masks from compares. cf_diff (self-test, 800 runs) and salu_diff (500)
pass. docs/design.md row updated.
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions