forked from OSchip/llvm-project
Use 64bit arithmetic for calculating distance between pointers.
llvm-svn: 179927
This commit is contained in:
parent
0f64e21bb9
commit
5ed99674e9
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue