Re: use ARM intrinsics in pg_lfind32() where available

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, john(dot)naylor(at)enterprisedb(dot)com
Subject: Re: use ARM intrinsics in pg_lfind32() where available
Date: 2022-08-19 22:28:14
Message-ID: 20220819222814.GA401294@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 19, 2022 at 02:26:02PM -0700, Andres Freund wrote:
> Are you sure there's not an appropriate define for us to use here instead of a
> configure test? E.g.
>
> echo|cc -dM -P -E -|grep -iE 'arm|aarch'
> ...
> #define __AARCH64_SIMD__ 1
> ...
> #define __ARM_NEON 1
> #define __ARM_NEON_FP 0xE
> #define __ARM_NEON__ 1
> ..
>
> I strikes me as non-scalable to explicitly test all the simd instructions we'd
> use.

Thanks for the pointer. GCC, Clang, and the Arm compiler all seem to
define __ARM_NEON, so here is a patch that uses that instead.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v2-0001-Use-ARM-Advanced-SIMD-intrinsic-functions-in-pg_l.patch text/x-diff 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cary Huang 2022-08-19 23:00:41 sslinfo extension - add notbefore and notafter timestamps
Previous Message David Zhang 2022-08-19 22:27:04 Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)