a couple of small patches for simd.h

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: pgsql-hackers@postgresql.org
Cc: johncnaylorls@gmail.com
Date: 2025-09-22T21:44:20Z
Lists: pgsql-hackers

Attachments

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.

0002 optimizes vector8_has_le() on AArch64 by using vminvq_u8().  I needed
vector8_has_ge() for the hex_encode()/hex_decode() work and noticed this
opportunity.

[0] https://commitfest.postgresql.org/patch/5538/

-- 
nathan

Commits

  1. Optimize vector8_has_le() on AArch64.

  2. Fix broken cast on MSVC