]> granicus.if.org Git - llvm/commitdiff
Fix BasicAA/2003-04-25-GEPCrash.ll
authorChris Lattner <sabre@nondot.org>
Fri, 25 Apr 2003 18:03:06 +0000 (18:03 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 25 Apr 2003 18:03:06 +0000 (18:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5940 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicAliasAnalysis.cpp

index f99ab800b2392c527050f72ad7f7be322506ec31..4911c0d69373ae8832f91b48670a22889bc8d2a8 100644 (file)
@@ -294,11 +294,11 @@ BasicAliasAnalysis::CheckGEPInstructions(GetElementPtrInst *GEP1, unsigned G1S,
     }
   }
   
-  int Offset1 = getTargetData().getIndexedOffset(GEPPointerTy, Indices1);
-  int Offset2 = getTargetData().getIndexedOffset(GEPPointerTy, Indices2);
+  int64_t Offset1 = getTargetData().getIndexedOffset(GEPPointerTy, Indices1);
+  int64_t Offset2 = getTargetData().getIndexedOffset(GEPPointerTy, Indices2);
   assert(Offset1 < Offset2 &&"There is at least one different constant here!");
 
-  if ((unsigned)(Offset2-Offset1) >= SizeMax) {
+  if ((uint64_t)(Offset2-Offset1) >= SizeMax) {
     //std::cerr << "Determined that these two GEP's don't alias [" 
     //          << SizeMax << " bytes]: \n" << *GEP1 << *GEP2;
     return NoAlias;