From: Nathan Bossart <nathandbossart@gmail.com>
To: John Naylor <johncnaylorls@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: a couple of small patches for simd.h
Date: Wed, 24 Sep 2025 12:41:11 -0500
Message-ID: <aNQtN89VW8z-yo3B@nathan> (raw)
In-Reply-To: <CANWCAZaLyxDHoDFjvtaz0aM6Agx=P5i=0T8HnkgLNdwXwJn9Ug@mail.gmail.com>
References: <aNHDNDSHleq0ogC_@nathan>
<CANWCAZaLyxDHoDFjvtaz0aM6Agx=P5i=0T8HnkgLNdwXwJn9Ug@mail.gmail.com>
On Wed, Sep 24, 2025 at 08:04:59AM +0700, John Naylor wrote:
> On Tue, Sep 23, 2025 at 4:44 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>> 0001 essentially reverts commit c6a43c2, and instead fixes the problem
>> (MSVC dislikes casts to the same type) by omitting the cast in the
>> problematic line in pg_lfind32(). While working on optimizing hex_encode()
>> and hex_decode() [0], I noticed that implicit conversions sufficed.
>
> I don't remember why that cast was there, but I suggest testing on gcc
> / aarch64 if you haven't already.
Ah, I thought CI was testing that, but apparently it is not. After some
basic testing in godbolt.org, I see that leaving out the cast makes
gcc/arm64 unhappy, and adding the cast makes msvc/x64 unhappy. gcc has a
-flax-vector-conversions option that fixes it, but the documentation for
that option [0] cautions against using it. So, 0001 is bogus, and I need
to figure out how to get the hex_{encode,decode} patches working for
gcc/arm64...
[0] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-flax-vector-conversions
--
nathan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, johncnaylorls@gmail.com
Subject: Re: a couple of small patches for simd.h
In-Reply-To: <aNQtN89VW8z-yo3B@nathan>
References: <aNHDNDSHleq0ogC_@nathan> <CANWCAZaLyxDHoDFjvtaz0aM6Agx=P5i=0T8HnkgLNdwXwJn9Ug@mail.gmail.com> <aNQtN89VW8z-yo3B@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox