Continued drops the high word of signed RDNA2 literals
The same machine code gave different results in Continued when the literal was written in decimal and hexadecimal. PortBridge cross-checked XCL, verified a local fix and shared the reproduction with Continued.
Recorded in the catalog
Leonida Continued
The bug reproduced on main and #224. Local sign extension fixed the hexadecimal input and left the signed and unsigned controls unchanged. The result was shared with Continued.
Automated test · Mixed result · LLVM 23.1.6, SPIR-V CPU interpreter
d0da7dade8b688f2e0f7f23f4155d6cbb438809eContinued before and after the local patch
Report date
LLVM encodes −100 and 0xffffff9c identically. Baseline Continued yielded (32, 0, 0, 0) for the hexadecimal input. With sign extension, it yielded (57, ffffffff, ffffffff, 1), matching both signed controls.
Automated test · Mixed result · LLVM 23.1.6, SPIR-V CPU interpreter, XCL HLSL emitter
d0da7dade8b688f2e0f7f23f4155d6cbb438809eThe same signed literal in arithmetic shift
Report date
The same input bytes for −100 and 0xffffff9c led to different results. The local patch corrected the hexadecimal spelling to (ffffffff, ffffffff, 1). All 97 shift checks passed.
XCL
For the same machine instructions, the XCL recompiler emitted high word 0xffffffff for both signed operations.
Automated test · Passed · XCL HLSL emitter, CPU
ba00224055aeb359476ad614ad5ec971d360836fReport date
The actual XCL recompiler processed the same instruction bytes. The emitted high word was 0xffffffff in both signed operations.