diff options
| author | QemmHD <290605352+QemmHD@users.noreply.github.com> | 2026-11-24 20:44:52 -0500 |
|---|---|---|
| committer | QemmHD <290605352+QemmHD@users.noreply.github.com> | 2026-11-24 20:45:56 -0500 |
| commit | bc2d333495399fb45c821fa760f3e9d879f1b622 (patch) | |
| tree | 9d30adaa3d9cd33e546d83c2dfb7e172a2a4f8a9 /runtime/opus_decoder/src | |
| parent | 0aecc5efab56a77eddf00ad6cefa046d42aaae6c (diff) | |
rdna2spirv: sign-extend the 32-bit literal of v_cmp(x)_*_i64, v_ashrrev_i64, v_mad_i64_i32 (SHADER-VALU-LITERAL-SEXT)claude/valu-literal-sext
LLVM's operand syntax widens a 32-bit literal in an i64 operand by sign
extension and in a u64/b64 operand by zero extension. llvm-mc prints -100
as 0xffffff9c, and the vector ops zero-extended that printed form, so
v_cmp_lt_i64 5, 0xffffff9c gave 1, v_ashrrev_i64 4, 0xffffff9c gave
0x0ffffff9:0 and v_mad_i64_i32 1, 1, 0xffffff9c had a zero high word.
The signed sources now go through Gen.valu_imm_i64; the u64/b64 ones
(v_cmp_*_u64, v_lshlrev/lshrrev_b64, v_mad_u64_u32) still zero-extend,
and f64 literals keep their high-word rule. Vector half of #978.
Tested: new tests/semantic/test_valu_signed_literal64.py (decimal, printed
hex and explicit pair agree; unsigned, positive-literal and inline-constant
controls) fails 5/8 on main and passes 8/8; full semantic suite 476 files /
6223 tests before, 477 / 6231 after, 0 failures; repo-consistency pytest
set 578 passed, 5 skipped; compileall clean. CPU only, no hardware.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
Diffstat (limited to 'runtime/opus_decoder/src')
0 files changed, 0 insertions, 0 deletions