[llvm-commits] [llvm] r136250 - in /llvm/trunk: lib/Transforms/IPO/ConstantMerge.cpp test/Transforms/ConstantMerge/merge-both.ll

Nick Lewycky nlewycky at google.com
Wed Jul 27 13:46:56 PDT 2011


On 27 July 2011 13:17, Frits van Bommel <fvbommel at gmail.com> wrote:

> On 27 July 2011 21:47, Nick Lewycky <nicholas at mxc.ca> wrote:
> > +unsigned ConstantMerge::getAlignment(GlobalVariable *GV) const {
> > +  if (TD)
> > +    return TD->getPreferredAlignment(GV);
> > +  return GV->getAlignment();
> > +}
>
> This seems to be the wrong way around: shouldn't an explicit alignment
> override the preferred alignment?
>

TargetData::getPreferredAlignment returns the explicit alignment on the GV
if it has one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110727/bec4ea32/attachment.html>


More information about the llvm-commits mailing list