[llvm-commits] [llvm] r140902 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/CodeGen/X86/alignment-2.ll
Bill Wendling
wendling at apple.com
Sat Oct 1 01:16:45 PDT 2011
On Sep 30, 2011, at 8:49 PM, Duncan Sands wrote:
> Hi Bill,
>
>> When inferring the pointer alignment, if the global doesn't have an initializer
>> and the alignment is 0 (i.e., it's defined globally in one file and declared in
>> another file) it could get an alignment which is larger than the ABI allows for
>> that type, resulting in aligned moves being used for unaligned loads.
>
> even if it has an initializer that doesn't mean anything if the global has a
> weak linkage type since in the final program a different initializer might be
> used. In short, the code a line or so above should use hasDefinitiveInitializer
> not hasInitializer.
>
Does that matter in this case? It's just trying to see if there's a preferred alignment, which from what I can tell relies upon the type and not the initializer. If I read this correctly, the presence of an initializer is what's important here.
Thoughts?
-bw
More information about the llvm-commits
mailing list