--with-llvm on 32-bit platforms?

Dmitry Mityugov <d.mityugov@postgrespro.ru>

From: Dmitry Mityugov <d.mityugov@postgrespro.ru>
To: pgsql-hackers@postgresql.org
Date: 2025-09-04T21:32:05Z
Lists: pgsql-hackers
It seems that when I add --with-llvm flag to ./configure on any 32-bit 
platform that I have (Debian 12, Debian 13, Arch Linux), many tests 
invoked by `make check` fail, or, sometimes, hang forever. Is this a 
known problem? It's not critical to me, just wanted to know if I should 
abandon --with-llvm forever on such platforms. On 64-bit Linux 
platforms, both x86 and ARM, --with-llvm works fine.

To reproduce, it's enough to:

make distclean
./configure --with-llvm
make -j23 -ks
make check

The last step is never successful to me, and, by the way, this can also 
be reproduced with clang:

make distclean
./configure CC=clang CXX=clang++ --with-llvm CFLAGS=-msse2
make -j23 -ks
make check

Thanks in advance for your attention to this problem, or telling me this 
is not a problem at all



Commits

  1. jit: Fix type used for Datum values in LLVM IR.

  2. Avoid faulty alignment of Datums in build_sorted_items().

  3. Make type Datum be 8 bytes wide everywhere.