Re: [PATCH] SVE popcount support
John Naylor <johncnaylorls@gmail.com>
From: John Naylor <johncnaylorls@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: "Chiranmoy.Bhattacharya@fujitsu.com" <Chiranmoy.Bhattacharya@fujitsu.com>, "Malladi, Rama" <ramamalladi@hotmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>, "Ragesh.Hajela@fujitsu.com" <Ragesh.Hajela@fujitsu.com>,
Salvatore Dipietro <dipiets@amazon.com>, "Devanga.Susmitha@fujitsu.com" <Devanga.Susmitha@fujitsu.com>
Date: 2025-03-27T08:31:27Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Optimize popcount functions with ARM SVE intrinsics.
- 519338ace410 18.0 landed
-
Optimize popcount functions with ARM Neon intrinsics.
- 6be53c27673a 18.0 landed
-
Rename TRY_POPCNT_FAST to TRY_POPCNT_X86_64.
- 9ac6f7e7ceb6 18.0 landed
On Thu, Mar 27, 2025 at 10:38 AM Nathan Bossart
<nathandbossart@gmail.com> wrote:
> I also noticed a silly mistake in 0003 that would cause us to potentially
> skip part of the tail. That should be fixed now.
I'm not sure whether that meant it could return the wrong answer, or
just make more work for paths further down.
If the former, then our test coverage is not adequate.
Aside from that, I only found one more thing that may be important: I
tried copying the configure/meson checks into godbolt.org, and both
gcc and clang don't like it, so unless there is something weird about
their setup (or my use of it) it's possible some other hosts won't
like it either.:
```
<source>:29:10: error: call to 'svwhilelt_b8' is ambiguous
pred = svwhilelt_b8(0, sizeof(buf));
^~~~~~~~~~~~
/opt/compiler-explorer/clang-16.0.0/lib/clang/16/include/arm_sve.h:15526:10:
note: candidate function
svbool_t svwhilelt_b8(uint64_t, uint64_t);
^
/opt/compiler-explorer/clang-16.0.0/lib/clang/16/include/arm_sve.h:15534:10:
note: candidate function
svbool_t svwhilelt_b8(int32_t, int32_t);
^
<source>: In function 'autoconf_popcount_test':
<source>:29:24: error: call to 'svwhilelt_b8' is ambiguous; argument 1
has type 'int32_t' but argument 2 has type 'uint64_t'
29 | pred = svwhilelt_b8(0, sizeof(buf));
| ^~~~~~~~~~~~
Compiler returned: 1
```
...Changing it to
pred = svwhilelt_b8((uint64_t)0, sizeof(buf));"
clears it up.
--
John Naylor
Amazon Web Services