diff options
| author | whoalin1 <207920491+whoalin1@users.noreply.github.com> | 2026-11-25 06:51:01 +0200 |
|---|---|---|
| committer | Man Alin <whoalin414@gmail.com> | 2026-11-30 22:29:44 +0000 |
| commit | 88139a27ef0b94ca6f4fca2a40ef9cbe58233826 (patch) | |
| tree | 27f9d362204a3f7c78dca02080b0450261d4434d /runtime/test/cpp_unwind_test.cpp | |
| parent | 944d4bd8cf2f5c39686c8a8668256d5a0e443d64 (diff) | |
rdna2spirv: extend the BitFieldUExtract workaround to cvt_i16/snorm and d16 saturate
The review of 97535ad found three more OpBitwiseAnd & 0xFFFF sites whose
operand is an %int-derived bitcast feeding a preserve-high-half merge,
the same shape NVIDIA's shader compiler miscompiles:
- v_cvt_i16_f16: OpConvertFToS %int -> Bitcast -> And, then write_lo16
or the op_sel merge (the u16 sibling is %uint and safe)
- v_cvt_norm_i16_f16: the snorm path has the same structure (unorm safe)
- saturate_int16 signed path: SClamp %int -> Bitcast -> And reaches the
preserve merges through the d16 image/buffer stores
All emit OpBitFieldUExtract %uint x, 0, 16 instead, spec-identical.
Audited every remaining And & 0xFFFF site: the rest are %uint-derived,
operand-side, packed-Or consumers, or constant masks.
RTX 4070 SUPER spot-checks of v_cvt_i16_f16/v_cvt_norm_i16_f16 (VOP2
form; llvm-mc rejects op_sel on these) produce the right words on both
the old and new modules, so the bug does not reproduce on this shape;
the extract removes the risky pattern regardless. Full semantic suite:
487 files, 6279 tests, 0 failures.
Co-Authored-By: Devin <noreply@cognition.ai>
Diffstat (limited to 'runtime/test/cpp_unwind_test.cpp')
0 files changed, 0 insertions, 0 deletions