diff options
Diffstat (limited to 'lib/Transforms/Scalar/DeadStoreElimination.cpp')
-rw-r--r-- | lib/Transforms/Scalar/DeadStoreElimination.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index 8b40da656e..2d38e76dbe 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -305,11 +305,11 @@ bool DSE::handleEndBlock(BasicBlock &BB) { if (AllocaInst* A = dyn_cast<AllocaInst>(*I)) { if (ConstantInt* C = dyn_cast<ConstantInt>(A->getArraySize())) pointerSize = C->getZExtValue() * - TD.getABITypeSize(A->getAllocatedType()); + TD.getTypePaddedSize(A->getAllocatedType()); } else { const PointerType* PT = cast<PointerType>( cast<Argument>(*I)->getType()); - pointerSize = TD.getABITypeSize(PT->getElementType()); + pointerSize = TD.getTypePaddedSize(PT->getElementType()); } // See if the call site touches it @@ -382,10 +382,10 @@ bool DSE::RemoveUndeadPointers(Value* killPointer, uint64_t killPointerSize, if (AllocaInst* A = dyn_cast<AllocaInst>(*I)) { if (ConstantInt* C = dyn_cast<ConstantInt>(A->getArraySize())) pointerSize = C->getZExtValue() * - TD.getABITypeSize(A->getAllocatedType()); + TD.getTypePaddedSize(A->getAllocatedType()); } else { const PointerType* PT = cast<PointerType>(cast<Argument>(*I)->getType()); - pointerSize = TD.getABITypeSize(PT->getElementType()); + pointerSize = TD.getTypePaddedSize(PT->getElementType()); } // See if this pointer could alias it |