Use 64bit arithmetic for calculating distance between pointers.

llvm-svn: 179927
This commit is contained in:
Nadav Rotem 2013-04-20 05:17:47 +00:00
parent 0f64e21bb9
commit 5ed99674e9
1 changed files with 2 additions and 2 deletions

View File

@ -94,11 +94,11 @@ bool BoUpSLP::isConsecutiveAccess(Value *A, Value *B) {
// Non constant distance.
if (!ConstOffSCEV) return false;
unsigned Offset = ConstOffSCEV->getValue()->getSExtValue();
int64_t Offset = ConstOffSCEV->getValue()->getSExtValue();
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->getTypeStoreSize(Ty);
int64_t Sz = DL->getTypeStoreSize(Ty);
return ((-Offset) == Sz);
}