[llvm] r179927 - Use 64bit arithmetic for calculating distance between pointers.

Nadav Rotem nrotem at apple.com
Fri Apr 19 22:17:47 PDT 2013


Author: nadav
Date: Sat Apr 20 00:17:47 2013
New Revision: 179927

URL: http://llvm.org/viewvc/llvm-project?rev=179927&view=rev
Log:
Use 64bit arithmetic for calculating distance between pointers.

Modified:
    llvm/trunk/lib/Transforms/Vectorize/VecUtils.cpp

Modified: llvm/trunk/lib/Transforms/Vectorize/VecUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/VecUtils.cpp?rev=179927&r1=179926&r2=179927&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/VecUtils.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/VecUtils.cpp Sat Apr 20 00:17:47 2013
@@ -94,11 +94,11 @@ bool BoUpSLP::isConsecutiveAccess(Value
   // 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);
 }
 





More information about the llvm-commits mailing list