[llvm-bugs] [Bug 24982] Compiler not properly honoring alignment when calling trivial default copy constructor

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 29 17:03:24 PDT 2015


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

John McCall <rjmccall at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rjmccall at apple.com
         Resolution|---                         |INVALID

--- Comment #1 from John McCall <rjmccall at apple.com> ---
This is correct behavior; the alignment parameter to llvm.memcpy applies to
both pointers, which means the previous code was buggy because the global c4 is
only 4-byte-aligned.  That is, the alignment argument has to be the minimum of
the alignment of the two pointers, not the maximum.

There is an effort to make llvm.memcpy capable of separately expressing the
alignment of the pointers.  When that happens, you should see that the source
alignment is 4 and the destination alignment is 16.

-- 
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/20150930/0c431df2/attachment.html>


More information about the llvm-bugs mailing list