[llvm-bugs] [Bug 28410] Optimized code contains illegal movaps instruction when using aligned attribute in typedef

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 8 09:49:58 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28410

John McCall <rjmccall at apple.com> changed:

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

--- Comment #8 from John McCall <rjmccall at apple.com> ---
Your code has undefined behavior: it's accessing a pointer whose type claims
that it has a certain alignment when the actual pointer does not.  The compiler
is allowed to assume that explicit alignment attributes are, in fact, correct. 
It is reasonable for the compiler to be more aggressive in the face of this
kind of information because the programmer took explicit steps to provide it.

It is likely that other compilers are not generating this particular
highly-aligned access simply because they're not fusing multiple accesses. 
LLVM is more aggressive about this kind of optimization.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160708/e2dc26cf/attachment.html>


More information about the llvm-bugs mailing list