summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-08 19:28:38 +0000
committerChris Lattner <sabre@nondot.org>2009-01-08 19:28:38 +0000
commitf3e696bc5a89e4212623c67bfb69f66d982be05f (patch)
tree830931b82a963619523e7b4cb0d920d29e13e4d7 /llvm/lib/Analysis
parent8c1cc34d6a2bbf68a2e507c31207dd957b91f43f (diff)
downloadbcm5719-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.cpp2
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());
OpenPOWER on IntegriCloud