We require DataLayout for analyzing the size of stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179206 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nadav Rotem
2013-04-10 18:57:27 +00:00
parent b4d6a6574d
commit 20cd5e6862
2 changed files with 6 additions and 1 deletions

View File

@ -94,7 +94,7 @@ bool BoUpSLP::isConsecutiveAccess(Value *A, Value *B) {
Type *Ty = cast<PointerType>(PtrA->getType())->getElementType();
// The Instructions are connsecutive if the size of the first load/store is
// the same as the offset.
unsigned Sz = (DL ? DL->getTypeStoreSize(Ty) : Ty->getScalarSizeInBits()/8);
unsigned Sz = DL->getTypeStoreSize(Ty);
return ((-Offset) == Sz);
}