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 1uTitR-008uN7-K1 for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jun 2025 15:15:33 +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 1uTitP-0046so-N0 for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jun 2025 15:15:32 +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 1uTitP-0046sP-DO for pgsql-hackers@lists.postgresql.org; Mon, 23 Jun 2025 15:15:32 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uTitO-003ZCE-19 for pgsql-hackers@lists.postgresql.org; Mon, 23 Jun 2025 15:15:31 +0000 Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-3de1875bf9dso41091985ab.2 for ; Mon, 23 Jun 2025 08:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750691729; x=1751296529; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=6Ronrc4tANhQpmQjzueyTXMc4QQndoMCrs1dyNf2678=; b=ms5cocbpe0gFXqES8wZHxDE7wXXD9HbomLwLwmf7tBlVQSRosFpKXTWUpXRi0WJIAy Oct/g4yoxxR4gYKlVZiWffMV+MTeDtdXRKoPvPEIX1BnumlTg8WAheGg6tTiuTtRXawM nw69mLGDTzu1grilIDTFyY6bq1y+UUCkeUFJH6ac6SWoWwU+K96C4RtUgRvey8C+RI+e DctzzFA+anKBRe2bGJqvQmt9KSGmsSk7zSETfzeqgsXito153oYHki5xLOh+b3A6XFdx XJHft/YnQD/bUqAckPPj9ACzkf0uRj/M6g2FoTVU2V4v+XpNaH6TL+2YFvVY7jcfL2r2 IEHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750691729; x=1751296529; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6Ronrc4tANhQpmQjzueyTXMc4QQndoMCrs1dyNf2678=; b=jwQ/RenA9NHQhPMMxJZKVTX8ih6zp6sAyohqCQlpRUO2BHqB2Nq4MBYyYgJW22MIPm RpRzE1ecwd5fNjjgnR2mQ69Okkg4B1Sy5SwiKb1QajJvTFLXTD55SYwb2mXb7GuJm+G+ mHt6kd8w1Dvs+tQN7eSoSYkekphtY70ZqnLaO9tsVimfDZYqWbNW7/rx02wCw9C/KKQZ IUWHk3QUtjEVE6pdg2TyZ7kOf7cwu+GeMWzv1o6qCn5YhKrMnx1U6U4CmUk34NeNpt7t 44WDhFRaVbJrHbvcI2N95GcW6ahH0YT8bFHLed+vNjK+ut8VpH3bows59MsdV3h6CGJr SmUA== X-Forwarded-Encrypted: i=1; AJvYcCW094BLRLyzDtCqUFrLAa3C7NBEfocWDt9Tp1SOOme89V02YWsrPprVXdY5KrMVzj3EKV3q5kEFDxsn77Vm@lists.postgresql.org X-Gm-Message-State: AOJu0YwGjfo8W4kp1lf5L/XNHcxmWDQc2i6l9pBmLfW0/5k0nRsmgarX /i+ckaej8cq+dqkag6wEAhAa4CzRqZGaM2x9P1fCxPb7LYScywFylVsV X-Gm-Gg: ASbGnculPLgVn4TsDiyKwXWWTEQUzum+bcYFTwp0KSdiMRVmyRUwcREo7BLjNRyQN2G vfqSdUlHn2x9Li6m+5ca/MmjCCVP9XP3m61w7cB5/ktJxZtVmpMwTRSYuLQgazr7s2rki4sUokm MBBno81vksbEliih9PCxJcsu3cuEfhkghQeZmKR2Kor2l5cyBDklg8LkbgS+P9GFZUcwEBg0mh8 0O0VlemNYhIJTmT1jCZFJrl1yElrarfyekGvFUSnTwaCgnBQrwWH5jZXdDILyb1OqEe0JlJ8LlQ 4DrRAJxZZA6N0MrRDPzervIMDHvfu8siYzKRPh2tn/gNzZiSPqvezbS98BmM1hyAnkOweBq632+ Tz+SepdUsUJxEgis2FJZhtaIkexV/GPg9tXkBrG8ouNzx3OjwE316 X-Google-Smtp-Source: AGHT+IEqvFRbXullnLTlkaco8jh/dSZ+5FNSebjxZ/bPyxrii+Ftuc8CtFmKe/Je+l90PJqu73oorA== X-Received: by 2002:a05:6e02:1aa1:b0:3dd:fad4:7c61 with SMTP id e9e14a558f8ab-3de38c5eed6mr151653095ab.8.1750691729546; Mon, 23 Jun 2025 08:15:29 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-5019df00367sm1782025173.52.2025.06.23.08.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 08:15:28 -0700 (PDT) Date: Mon, 23 Jun 2025 10:15:26 -0500 From: Nathan Bossart To: Tom Lane Cc: John Naylor , Andy Fan , "Devulapalli, Raghuveer" , Jesper Pedersen , Tomas Vondra , "pgsql-hackers@lists.postgresql.org" , "Shankaran, Akash" Subject: Re: Improve CRC32C performance on SSE4.2 Message-ID: References: <87bjqncl24.fsf@163.com> <3350336.1750690281@sss.pgh.pa.us> <3353158.1750691445@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3353158.1750691445@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jun 23, 2025 at 11:10:45AM -0400, Tom Lane wrote: > Nathan Bossart writes: >> On Mon, Jun 23, 2025 at 10:51:21AM -0400, Tom Lane wrote: >>> This has broken the build completely on my RHEL8 x86_64 box, >>> with gcc 8.5.0: > >> Unfortunately, this will probably require more than replacing >> _mm512_castsi512_si128 with _mm512_zextsi512_si128 because the latter >> doesn't exist. > > I was imagining just including _mm512_zextsi128_si512() in the > code being tested during configure, so that we fall back to > the non-AVX-512 code if the compiler is too old to have it. > I don't really feel a need to work harder than that. Sorry, my note wasn't clear. Right now, the configure test uses _mm512_castsi512_si128(), so we can't just do a simple s/cast/zext. We'll need to make a slightly bigger modification to the test to make sure the zext intrinsics are understood. I agree that we needn't work any harder than that. -- nathan