From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | John Naylor <johncnaylorls(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: a couple of small patches for simd.h |
Date: | 2025-09-24 17:41:11 |
Message-ID: | aNQtN89VW8z-yo3B@nathan |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2025-09-24 18:26:45 | Re: Invalid primary_slot_name triggers warnings in all processes on reload |
Previous Message | Christoph Berg | 2025-09-24 17:27:39 | Re: "openssl" should not be optional |