[llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Mar 2 17:44:00 PST 2003
Changes in directory llvm/lib/Analysis:
BasicAliasAnalysis.cpp updated: 1.3 -> 1.4
---
Log message:
Fix a problem with negative indexes
---
Diffs of the changes:
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.3 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.4
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.3 Wed Feb 26 15:57:23 2003
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Sun Mar 2 17:43:34 2003
@@ -301,11 +301,11 @@
}
}
- unsigned Offset1 = getTargetData().getIndexedOffset(GEPPointerTy, Indices1);
- unsigned Offset2 = getTargetData().getIndexedOffset(GEPPointerTy, Indices2);
+ int Offset1 = getTargetData().getIndexedOffset(GEPPointerTy, Indices1);
+ int Offset2 = getTargetData().getIndexedOffset(GEPPointerTy, Indices2);
assert(Offset1 < Offset2 &&"There is at least one different constant here!");
- if (Offset2-Offset1 >= SizeMax) {
+ if ((unsigned)(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