summaryrefslogtreecommitdiff
path: root/lib/Transforms/Vectorize/VecUtils.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-04-20 05:17:47 +0000
committerNadav Rotem <nrotem@apple.com>2013-04-20 05:17:47 +0000
commitfbcaf59e331310fcb783125351fd9e3b96c13e66 (patch)
tree4ea205a5184225ea9d1f194d72b7d869ee05445a /lib/Transforms/Vectorize/VecUtils.cpp
parentabe64dc6f7363c7e6170568e382fb06d81d62f51 (diff)
downloadllvm-fbcaf59e331310fcb783125351fd9e3b96c13e66.tar.gz
llvm-fbcaf59e331310fcb783125351fd9e3b96c13e66.tar.bz2
llvm-fbcaf59e331310fcb783125351fd9e3b96c13e66.tar.xz
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
Diffstat (limited to 'lib/Transforms/Vectorize/VecUtils.cpp')
-rw-r--r--lib/Transforms/Vectorize/VecUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Vectorize/VecUtils.cpp b/lib/Transforms/Vectorize/VecUtils.cpp
index a69646336c..e1ff3d91e1 100644
--- a/lib/Transforms/Vectorize/VecUtils.cpp
+++ b/lib/Transforms/Vectorize/VecUtils.cpp
@@ -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);
}