[Bug target/105429] Unnecessary moves generated with _mm_crc32_u64

kspalaiologos at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Apr 29 12:38:35 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105429

--- Comment #2 from Palaiologos <kspalaiologos at gmail dot com> ---
I have observed the same behaviour with and without `mov eax, eax`. CRC32 is a
32-bit checksum, so I'd presume that the high bits aren't considered by the
instruction.

To support my claim, Vol. 2A 3-257 of Intel Software Development Manual gives
the following operation for 2 REX.W 0F 38 F1 /r:

>>>
TEMP1[63-0] := BIT_REFLECT64 (SRC[63-0])
TEMP2[31-0] := BIT_REFLECT32 (DEST[31-0])
TEMP3[95-0] := TEMP1[63-0] « 32
TEMP4[95-0] := TEMP2[31-0] « 64
TEMP5[95-0] := TEMP3[95-0] XOR TEMP4[95-0]
TEMP6[31-0] := TEMP5[95-0] MOD2 11EDC6F41H
DEST[31-0] := BIT_REFLECT (TEMP6[31-0])
DEST[63-32] := 00000000H
<<<


More information about the Gcc-bugs mailing list