Can _mm_crc32_u64() return a value that is bigger than MAX_UINT32?

Segher Boessenkool segher@kernel.crashing.org
Mon Feb 12 17:04:00 GMT 2018


Hi Alex,

On Mon, Feb 12, 2018 at 06:19:29PM +0200, Alex Lyakas wrote:
> Can you confirm then, that despite returning a 64-bit value, the result 
> will never actually cross the maximal 32-bit value? Can you perhaps point 
> us at gcc code, so that we can try to ensure that?

Documentation says it should not.  I would assume GCC implements this
correctly.  I don't know where in the code this is handled (if at all,
the generated machine instruction should have that property, there is
nothing the compiler needs to do extra).


Segher



More information about the Gcc-help mailing list