Re: vectorized CRC on ARM64

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: John Naylor <johncnaylorls@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-04T14:36:58Z
Lists: pgsql-hackers
On Sat, Apr 04, 2026 at 08:52:34PM +0700, John Naylor wrote:
> Thanks for looking! Pushed with a minor comment tweak and removal of
> the CFLAGS save-and-restore dance since we don't need it anymore.
> Let's see what the buildfarm thinks.

Ha, I think koel is going to complain about your comment that talks about
pgindent...

diff --git a/src/port/pg_crc32c_armv8.c b/src/port/pg_crc32c_armv8.c
index b404e6c373e..5fa57fb4927 100644
--- a/src/port/pg_crc32c_armv8.c
+++ b/src/port/pg_crc32c_armv8.c
@@ -162,8 +162,8 @@ pg_comp_crc32c_pmull(pg_crc32c crc, const void *data, size_t len)
         }

         /*
-         * pgindent complained of unmatched parens, so the following has
-         * been re-written with intrinsics:
+         * pgindent complained of unmatched parens, so the following has been
+         * re-written with intrinsics:
          *
          * x0 = veorq_u64((uint64x2_t) {crc0, 0}, x0);
          */

-- 
nathan



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Use C11 alignas instead of pg_attribute_aligned

  2. Add missing guard for __builtin_constant_p

  3. Exit early from pg_comp_crc32c_pmull for small inputs

  4. Fix unused function warning on Arm platforms

  5. Compute CRC32C on ARM using the Crypto Extension where available