[llvm-commits] [llvm] r129428 - in /llvm/trunk: lib/Target/TargetData.cpp test/CodeGen/ARM/2011-04-12-AlignBug.ll

Duncan Sands baldrick at free.fr
Wed Apr 13 00:42:02 PDT 2011


Hi Cameron,

> If a global variable has a specified alignment that is less than the preferred
> alignment for its type, use the minimum of the specified alignment and the ABI
> alignment. This fixes<rdar://problem/9275290>.

if the ABI alignment is 1, the preferred alignment is 4 and someone asks for an
alignment of 2 then you give them an alignment of 1.  Isn't it wrong to ever
use an alignment less than was explicitly asked for by the user?  Are you sure
you don't want to use the maximum of the ABI and the specified alignment?

Ciao, Duncan.



More information about the llvm-commits mailing list