Files
metal2vulkan/docs
Anees Iqbal 5d2c0bda2e Conformance: signed remainders of every width and sign, recorded on the M3
The case signed-remainders runs the owned fixture kernel_signed_remainders: each of 238 threads
reads a 64-bit dividend and divisor (17 dividends by 14 divisors: both signs, the most negative
long and int, low words that are the most negative short and char, values past 32 bits) and
writes eight words: the remainder of the low words as int, short and char, the 64-bit remainder's
two words, the exclusive-or of an int2 remainder's lanes, and the low word's remainders by 3 and
-8. Apple's compiler writes srem i32, i16, i64 and <2 x i32> by run-time divisors and srem i32 by
the constants 3 and 8 (x % -8 is x % 8). A remainder MSL leaves undefined (by zero, or of the
most negative value by -1) is never taken: the fixture writes 0xdeadbeef there. Every column
compares exactly.

It holds every device to Metal's answer where the translator's signed remainder (the commit
before last) replaced OpSRem, which Vulkan makes poison for a negative operand without
maintenance8.

Recorded on the M3 Max, macOS 27.0.1 (job m3-max-64656, which also compiled the fixture's
companions with scripts/regen-air-fixtures under Apple metal 32023.922 and LLVM 21; TOOLCHAIN
records the fixture's line). Metal's 1,904 recorded words equal C's truncating remainder for
every operand pair (checked from the recording against a reference written apart from the
fixture). docs/CONFORMANCE-COVERAGE.md regenerated (scripts/conformance-coverage/coverage.py).
2026-11-21 12:46:21 -08:00
..