Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uTiWJ-008j1U-LK for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jun 2025 14:51:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uTiWH-003naQ-HW for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jun 2025 14:51:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uTiWH-003naH-7s for pgsql-hackers@lists.postgresql.org; Mon, 23 Jun 2025 14:51:37 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uTiWG-003Z04-0S for pgsql-hackers@lists.postgresql.org; Mon, 23 Jun 2025 14:51:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 55NEpLmv3350337; Mon, 23 Jun 2025 10:51:21 -0400 From: Tom Lane To: John Naylor cc: Andy Fan , "Devulapalli, Raghuveer" , Nathan Bossart , Jesper Pedersen , Tomas Vondra , "pgsql-hackers@lists.postgresql.org" , "Shankaran, Akash" Subject: Re: Improve CRC32C performance on SSE4.2 In-reply-to: References: <87o6uqd3iv.fsf@163.com> <029f0848-8bc2-4d99-aebd-345949f97622@gmail.com> <87frg1dc3k.fsf@163.com> <87bjqncl24.fsf@163.com> Comments: In-reply-to John Naylor message dated "Mon, 23 Jun 2025 18:07:47 +0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3350335.1750690281.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 23 Jun 2025 10:51:21 -0400 Message-ID: <3350336.1750690281@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk John Naylor writes: > Pushed, thanks everyone! This has broken the build completely on my RHEL8 x86_64 box, with gcc 8.5.0: $ ./configure ... $ make -s pg_crc32c_sse42.c: In function 'pg_comp_crc32c_avx512': pg_crc32c_sse42.c:126:25: warning: implicit declaration of function '_mm51= 2_zextsi128_si512'; did you mean '_mm512_castsi128_si512'? [-Wimplicit-fun= ction-declaration] x0 =3D _mm512_xor_si512(_mm512_zextsi128_si512(_mm_cvtsi32_si128(crc0))= , x0); ^~~~~~~~~~~~~~~~~~~~~~ _mm512_castsi128_si512 pg_crc32c_sse42.c:126:25: error: incompatible type for argument 1 of '_mm5= 12_xor_si512' x0 =3D _mm512_xor_si512(_mm512_zextsi128_si512(_mm_cvtsi32_si128(crc0))= , x0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin= .h:45, from pg_crc32c_sse42.c:19: /usr/lib/gcc/x86_64-redhat-linux/8/include/avx512fintrin.h:7267:27: note: = expected '__m512i' {aka '__vector(8) long long int'} but argument is of ty= pe 'int' _mm512_xor_si512 (__m512i __A, __m512i __B) ~~~~~~~~^~~ make[2]: *** [: pg_crc32c_sse42.o] Error 1 I see similar symptoms on buildfarm animal conchuela, which is DragonFly BSD of some vintage or other. Not sure why more animals aren't complaining. Anyway, it seems that the configure probe to see if this facility is available had better be adjusted to match the new code. regards, tom lane