Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf83f148

Browse files
committed
Workaround code generation bug in clang
At optimization level -O0, builds on recent clang fail to produce thecorrect CRC32C with our AVX-512 implementation. For now, just disablethe runtime check for clang at -O0. When this is fixed upstream and weknow 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.comDiscussion:https://postgr.es/m/87o6uqd3iv.fsf%40163.com
1 parentfd385c4 commitf83f148

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/port/pg_crc32c_sse42_choose.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ pg_comp_crc32c_choose(pg_crc32c crc, const void *data, size_t len)
9595
__cpuidex(exx,7,0);
9696
#endif
9797

98-
#ifdefUSE_AVX512_CRC32C_WITH_RUNTIME_CHECK
98+
#if defined(__clang__)&& !defined(__OPTIMIZE__)
99+
/* Some versions of clang are broken at -O0 */
100+
#elif defined(USE_AVX512_CRC32C_WITH_RUNTIME_CHECK)
99101
if (exx[2]& (1 <<10)&&/* VPCLMULQDQ */
100102
exx[1]& (1 <<31))/* AVX512-VL */
101103
pg_comp_crc32c=pg_comp_crc32c_avx512;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp