]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Properly fix AVX-512 CRC calculation bug
authorJohn Naylor <john.naylor@postgresql.org>
Mon, 23 Jun 2025 11:03:56 +0000 (18:03 +0700)
committerJohn Naylor <john.naylor@postgresql.org>
Mon, 23 Jun 2025 11:03:56 +0000 (18:03 +0700)
commit43da394304fba820830da2cef2c0214fe292c037
treead7a9c591f06d1a45cf89f6d625426cdb07ea029
parent2c0d8b95080e1d51c60d9c6f6a2e4460d6dfaf77
Properly fix AVX-512 CRC calculation bug

The problem that led to the workaround in f83f14881c7 was not in fact
a compiler bug, but a failure to zero the upper bits of the vector
register containing the initial scalar CRC value. Fix that and revert
the workaround.

Diagnosed-by: Nathan Bossart <nathandbossart@gmail.com>
Diagnosed-by: Raghuveer Devulapalli <raghuveer.devulapalli@intel.com>
Tested-by: Andy Fan <zhihuifan1213@163.com>
Tested-by: Soumyadeep Chakraborty <soumyadeep2007@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Raghuveer Devulapalli <raghuveer.devulapalli@intel.com>
Discussion: https://postgr.es/m/PH8PR11MB82866B07AA6758D12F699C00FB70A@PH8PR11MB8286.namprd11.prod.outlook.com
src/port/pg_crc32c_sse42.c
src/port/pg_crc32c_sse42_choose.c