From: Victor Zhang Date: Fri, 3 Jan 2025 17:35:18 +0000 (-0800) Subject: Do not vary row matchfinder selection based on availability of SSE2/Neon X-Git-Tag: v1.5.7^2~43^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d88651e6041995243c8cd6884bbc44c279ab80d2;p=thirdparty%2Fzstd.git Do not vary row matchfinder selection based on availability of SSE2/Neon Move towards a stronger guarantee of reproducibility by removing this small difference for machines without SSE2/Neon. The SIMD behavior is now the default for all platforms. --- diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index 52c54b4da..04b6bb9f1 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -237,19 +237,10 @@ static int ZSTD_rowMatchFinderUsed(const ZSTD_strategy strategy, const ZSTD_Para /* Returns row matchfinder usage given an initial mode and cParams */ static ZSTD_ParamSwitch_e ZSTD_resolveRowMatchFinderMode(ZSTD_ParamSwitch_e mode, const ZSTD_compressionParameters* const cParams) { -#if defined(ZSTD_ARCH_X86_SSE2) || defined(ZSTD_ARCH_ARM_NEON) - int const kHasSIMD128 = 1; -#else - int const kHasSIMD128 = 0; -#endif if (mode != ZSTD_ps_auto) return mode; /* if requested enabled, but no SIMD, we still will use row matchfinder */ mode = ZSTD_ps_disable; if (!ZSTD_rowMatchFinderSupported(cParams->strategy)) return mode; - if (kHasSIMD128) { - if (cParams->windowLog > 14) mode = ZSTD_ps_enable; - } else { - if (cParams->windowLog > 17) mode = ZSTD_ps_enable; - } + if (cParams->windowLog > 14) mode = ZSTD_ps_enable; return mode; }