[Bug target/99754] [sse2] new _mm_loadu_si16 and _mm_loadu_si32 implemented incorrectly
peter at cordes dot ca
gcc-bugzilla@gcc.gnu.org
Fri Mar 11 15:21:50 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99754
--- Comment #3 from Peter Cordes <peter at cordes dot ca> ---
Wait a minute, the current implementation of _mm_loadu_si32 isn't
strict-aliasing or alignment safe!!! That defeats the purpose for its
existence as something to use instead of _mm_cvtsi32_si128( *(int*)p );
The current code contains a deref of a plain (int*).
It should be using something like
typdef int unaligned_aliasing_int __attribute__((aligned(1),may_alias));
More information about the Gcc-bugs
mailing list