https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120858
--- Comment #5 from Simon H. <sh1.gccbug at tikouka dot nz> --- Created attachment 61757 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61757&action=edit Source code confirming equivalent behaviour for four different variants. As well as the generic clmul optimisation for 64-bit, there's also the need to detect that the operation can be replaced with a single instruction. The example implementation of crc_04C11DB7_u64() using the crc64 builtin gives the same results as the crc32x instruction. It merely stuffs zeroes in the bottom of the polynomial to make it emulate a 32-bit crc because there's no 32-bit crc builtin with 64-bit argument. Demonstration code attached (same as the godbolt page but with an extra column).
