Re: use ARM intrinsics in pg_lfind32() where available
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: John Naylor <john.naylor@enterprisedb.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-08-27T22:15:02Z
Lists: pgsql-hackers
On Sat, Aug 27, 2022 at 05:18:34PM -0400, Tom Lane wrote: > In short, I think the critical part of 0002 needs to look more like > this: > > +#elif defined(__aarch64__) && defined(__ARM_NEON) > +/* > + * We use the Neon instructions if the compiler provides access to them > + * (as indicated by __ARM_NEON) and we are on aarch64. While Neon support is > + * technically optional for aarch64, it appears that all available 64-bit > + * hardware does have it. Neon exists in some 32-bit hardware too, but > + * we could not realistically use it there without a run-time check, > + * which seems not worth the trouble for now. > + */ > +#include <arm_neon.h> > +#define USE_NEON > ... Thank you for the analysis! I'll do it this way in the next patch set. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Further code review of port/simd.h
- 865424627db6 16.0 landed
-
Fix broken cast on MSVC
- c6a43c25a8ba 16.0 landed
-
Remove unused symbol __aarch64
- 4112e39f70ee 16.0 landed