[llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 25 13:04:00 PDT 2003


Changes in directory llvm/lib/Analysis:

BasicAliasAnalysis.cpp updated: 1.7 -> 1.8

---
Log message:

Fix BasicAA/2003-04-25-GEPCrash.ll


---
Diffs of the changes:

Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.7 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.8
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.7	Tue Apr 22 17:00:27 2003
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp	Fri Apr 25 13:03:06 2003
@@ -294,11 +294,11 @@
     }
   }
   
-  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;





More information about the llvm-commits mailing list