Workaround code generation bug in clang master github/master
authorJohn Naylor <john.naylor@postgresql.org>
Mon, 16 Jun 2025 02:27:15 +0000 (09:27 +0700)
committerJohn Naylor <john.naylor@postgresql.org>
Mon, 16 Jun 2025 02:27:15 +0000 (09:27 +0700)
commitf83f14881c7a09198863cb46033af8959a462d8b
tree22e2c031bd4c93831040da97d9715543cc6baafb
parentfd385c4c62d1762c88c0cdb145f354c834875dce
Workaround code generation bug in clang

At optimization level -O0, builds on recent clang fail to produce the
correct CRC32C with our AVX-512 implementation. For now, just disable
the runtime check for clang at -O0. When this is fixed upstream and we
know the extent of the breakage, we can adjust to be version-specific.

Reported-by: Soumyadeep Chakraborty <soumyadeep2007@gmail.com>
Reported-by: Andy Fan <zhihuifan1213@163.com>
Tested-by: Andy Fan <zhihuifan1213@163.com>
Discussion: https://postgr.es/m/CAE-ML%2B-OV6p9uvCFBcSQjZUEh__y0h-KjN%2BBseyGJHt7u8EP%2Bw%40mail.gmail.com
Discussion: https://postgr.es/m/87o6uqd3iv.fsf%40163.com
src/port/pg_crc32c_sse42_choose.c