diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-01-08 19:28:38 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-01-08 19:28:38 +0000 | 
| commit | f3e696bc5a89e4212623c67bfb69f66d982be05f (patch) | |
| tree | 830931b82a963619523e7b4cb0d920d29e13e4d7 /llvm/lib/Analysis | |
| parent | 8c1cc34d6a2bbf68a2e507c31207dd957b91f43f (diff) | |
| download | bcm5719-llvm-f3e696bc5a89e4212623c67bfb69f66d982be05f.tar.gz bcm5719-llvm-f3e696bc5a89e4212623c67bfb69f66d982be05f.zip | |
ValueTracker can't assume that an alloca with no specified alignment 
will get its preferred alignment.  It has to be careful and cautiously assume
it will just get the ABI alignment.  This prevents instcombine from rounding
up the alignment of a load/store without adjusting the alignment of the alloca.
llvm-svn: 61934
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index c51a719313f..b8aac9deb79 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -416,7 +416,7 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask,      unsigned Align = AI->getAlignment();      if (Align == 0 && TD) {        if (isa<AllocaInst>(AI)) -        Align = TD->getPrefTypeAlignment(AI->getType()->getElementType()); +        Align = TD->getABITypeAlignment(AI->getType()->getElementType());        else if (isa<MallocInst>(AI)) {          // Malloc returns maximally aligned memory.          Align = TD->getABITypeAlignment(AI->getType()->getElementType()); | 

