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 1uRJRS-009v3V-C2 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Jun 2025 23:40:42 +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 1uRJRO-004LnV-Ku for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Jun 2025 23:40:39 +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 1uRJRO-004Ljc-Am for pgsql-hackers@lists.postgresql.org; Mon, 16 Jun 2025 23:40:38 +0000 Received: from m16.mail.163.com ([220.197.31.2]) by makus.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1uRJRI-002Oko-0t for pgsql-hackers@lists.postgresql.org; Mon, 16 Jun 2025 23:40:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=H8bKwuUMi4Pz10ndTkQPAcSX5wwJzjH3b5C8VBnrXnE=; b=MvmN8XxQnoAUrCnhQAS1umqYPeXkeoguSdmiNYR8CdoJXAwLqRkjKEncbV87IL 6bvebnCa9iaoTI4EXVT7Bya/XInAiZF1bj0/EFcjrFrkW3EQyBDyF/IylJ/WS7sC NoAsFSWn9+ayVNqQqDuRVdu2DWQwV7EevpBbr/xvvUjUM= Received: from lovely-coding (unknown []) by gzsmtp4 (Coremail) with SMTP id PygvCgAne99jq1Bo5NUiDQ--.9082S3; Tue, 17 Jun 2025 07:40:20 +0800 (CST) From: Andy Fan To: "Devulapalli, Raghuveer" Cc: Nathan Bossart , John Naylor , Jesper Pedersen , Tomas Vondra , "pgsql-hackers@lists.postgresql.org" , "Shankaran, Akash" Subject: Re: Improve CRC32C performance on SSE4.2 In-Reply-To: (Raghuveer Devulapalli's message of "Mon, 16 Jun 2025 22:20:59 +0000") References: <87o6uqd3iv.fsf@163.com> <029f0848-8bc2-4d99-aebd-345949f97622@gmail.com> <87frg1dc3k.fsf@163.com> Date: Mon, 16 Jun 2025 23:40:19 +0000 Message-ID: <87bjqncl24.fsf@163.com> MIME-Version: 1.0 Content-Type: text/plain X-CM-TRANSID: PygvCgAne99jq1Bo5NUiDQ--.9082S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUUksgDUUUU X-Originating-IP: [113.250.190.7] X-CM-SenderInfo: x2klx3xlid0iqsrtqiywtou0bp/xtbBhRduU2hQoAy0oQAAsu List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Devulapalli, Raghuveer" writes: > Great catch! From the intrinsic manual: > > Cast vector of type __m128i to type __m512i; the upper 384 bits of the > result are undefined. Just be curious, what kind of optimization (like what -O2 does) could mask this issue? > Replacing that with _mm512_zextsi128_si512 fixes the problem. congratulations! -- Best Regards Andy Fan