From: Nadav Rotem Date: Sat, 20 Apr 2013 05:17:47 +0000 (+0000) Subject: Use 64bit arithmetic for calculating distance between pointers. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fbcaf59e331310fcb783125351fd9e3b96c13e66;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/Vectorize/VecUtils.cpp b/lib/Transforms/Vectorize/VecUtils.cpp index a69646336c8..e1ff3d91e16 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(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); }