mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-30 20:34:21 +00:00
Use 64bit arithmetic for calculating distance between pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179927 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
abe64dc6f7
commit
fbcaf59e33
@ -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…
x
Reference in New Issue
Block a user