On Fri, Jan 17, 2025 at 1:05 PM Paul Eggert <egg...@cs.ucla.edu> wrote: > > On 2025-01-17 06:44, Jeffrey Walton wrote: > > Change: > > > > const __m128i *data = buf; > > > > To this so the compiler cannot pick between MOVDQA and MOVDQU: > > > > const __m128i data = _mm_loadu_si128(buf); > > This doesn't look right, as 'data' is used as a pointer later.
You can take the address of data. You can do a lot of unusual things, like zero half the value: __m128i data = _mm_loadu_si128(buf); memset( (uint8_t*) &data, 0, 8 ); And copy a buffer to a variable: __m128i data; memcpy( (uint8_t*) &data, buf, 16 ); I don't recommend doing them, but I know it can be done. Jeff