Files
parallel-ps2/tests/gsvec
LibretroAdmin 41e910857f SPU2: build the reverb FIR on gs_vector
gs_vector gains adds16, hadds16 and mul16hrs, the three the resampler is
made of. The last two are SSSE3 instructions, so the SSE2 tier builds
them from mullo/mulhi and a lane gather, and NEON gets its own forms;
the oracle checks all three against a written-out scalar model at every
tier and the equivalence lane checks them against GSVector4i.

The resampler then drops GSVector4i/GSVector8i. It builds at SSE2 now,
which it could not before -- GSVector4i reaches for pminsd with no
fallback -- and the 256-bit path is spelled directly, since AVX2 is the
only place a 16-lane form exists.

Taps stay written out rather than looped: the accumulator saturates, so
the order has to stand, and a loop costs the multiplies their overlap.
Hoisting the buffer base out of them is what pays: ReverbDownsample goes
39 instructions and 15 memory ops to 26 and 13, the unit's text 781
bytes to 669 at SSE4.1 and 1053 to 957 at AVX2, and a six-million-call
microbenchmark 69 ms to 65. The AVX2 path is unchanged at 66 ms.

tests/spu2/build.sh now sweeps -msse2, -msse4.1 and -mavx2 under both
compilers; all six builds agree on all eight hashes.
2026-09-21 19:07:28 +02:00
..