git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179206
91177308-0d34-0410-b5e6-
96231b3b80d8
AA = &getAnalysis<AliasAnalysis>();
StoreRefs.clear();
+ // Must have DataLayout. We can't require it because some tests run w/o
+ // triple.
+ if (!DL)
+ return false;
+
// Use the bollom up slp vectorizer to construct chains that start with
// he store instructions.
BoUpSLP R(&BB, SE, DL, TTI, AA);
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);
}