[cfe-dev] libc++ std::cout alignment trouble (was: Re: [llvm] r240144 - [SLP] Vectorize for all-constant entries.)

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 4 10:09:11 PST 2016


On Mon, Jan 4, 2016 at 12:44 PM, Joerg Sonnenberger via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Mon, Jan 04, 2016 at 11:53:37AM -0500, James Y Knight via llvm-commits
> wrote:
> > Normally, increasing the alignment of a variable beyond what is
> > requested is okay. The reason there's a problem in this instance is
> > due to the way that shared objects work in ELF -- and that's a problem
> > regardless of whether the alignment was user-specified or not.
>
> Actually, it is not so much the shared object side that is wrong. I
> still consider this to be fundamentally an LD bug -- it should be
> ensuring at least 16 Bytes alignment there.
>

Why do you think that there's a bug in ld -- it gets its alignment from the
observed alignment of the input object, right? If the input is 8-byte
aligned, why should it force the output to be 16-byte aligned?

But regardless of whether there's also a bug in ld, I still think this is
definitely an LLVM bug; it could just as well increase the required
alignment of a global to 32...which would also be wrong.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160104/3eb5199f/attachment.html>


More information about the llvm-commits mailing list