[LLVMbugs] [Bug 12168] Need to fix signatures of *mmintrin.h APIs so we we don't end up with illegal casts in existing code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 3 16:58:14 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=12168

Chris Lattner <clattner at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #6 from Chris Lattner <clattner at apple.com> 2012-03-03 18:58:14 CST ---
I don't see a bug here.  The function in question is defined as:


static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
_mm_loadu_si128(__m128i const *p)
{
  struct __loadu_si128 {
    __m128i v;
  } __attribute__((packed, may_alias));
  return ((struct __loadu_si128*)p)->v;
}

Here we're doing a load through an explicitly unaligned pointer (the struct is
attribute(packed), so it has alignment = 1).

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list