From: Nathan Moinvaziri Date: Sat, 3 Jan 2026 02:14:24 +0000 (-0800) Subject: Don't compile in Chorba for vpclmulqdq because it is never used X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=714a5f09abf41a6587be4d756b94055d46185a64;p=thirdparty%2Fzlib-ng.git Don't compile in Chorba for vpclmulqdq because it is never used By the time Chorba if statement is hit, len is already reduced to < 256. --- diff --git a/arch/x86/crc32_pclmulqdq_tpl.h b/arch/x86/crc32_pclmulqdq_tpl.h index 6feb40ed7..96aedf2df 100644 --- a/arch/x86/crc32_pclmulqdq_tpl.h +++ b/arch/x86/crc32_pclmulqdq_tpl.h @@ -310,8 +310,7 @@ Z_FORCEINLINE static uint32_t crc32_copy_impl(uint32_t crc, uint8_t *dst, const xmm_crc2 = _mm512_extracti32x4_epi32(zmm_crc0, 2); xmm_crc3 = _mm512_extracti32x4_epi32(zmm_crc0, 3); } -#endif - +#else /* Implement Chorba algorithm from https://arxiv.org/abs/2412.16398 * We interleave the PCLMUL-base folds with 8x scaled generator * polynomial copies; we read 8x QWORDS and then XOR them into @@ -506,6 +505,8 @@ Z_FORCEINLINE static uint32_t crc32_copy_impl(uint32_t crc, uint8_t *dst, const } #endif +#endif /* X86_VPCLMULQDQ */ + while (len >= 64) { len -= 64; xmm_t0 = _mm_load_si128((__m128i *)src);