--- Comment #4 from Jakub Jelinek <jakub at gcc dot> ---
I don't see how this is related to sanitizer, sanitizer just checks what it
Say _mm_load_sd is implemented as
/* Create a vector with element 0 as *P and the rest zero.  */
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__,
_mm_load_sd (double const *__P)
  return _mm_set_sd (*__P);
and so pedantically requires aligned load, it is like any other double *

If these intrinsics really allow misaligned loads, then we need to use
something different, not sure if e.g.
  struct S __attribute__((packed)) { double d; } const *p = (struct S const *)
(void *) __P;
  return _mm_set_sd (p->d);
would be ok from aliasing POV or if we'd need to introduce a builtin to load a
potentially misaligned float or double.  I guess the most important would be
that it doesn't slow down code.

Reply via email to