[llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp
Chris Lattner
sabre at nondot.org
Fri Jan 12 10:21:04 PST 2007
Changes in directory llvm/lib/Analysis:
BasicAliasAnalysis.cpp updated: 1.99 -> 1.100
---
Log message:
GEP operands can't be bools
---
Diffs of the changes: (+3 -6)
BasicAliasAnalysis.cpp | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.99 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.100
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.99 Thu Jan 11 22:24:45 2007
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Fri Jan 12 12:20:48 2007
@@ -434,8 +434,7 @@
if (cast<PointerType>(
BasePtr->getType())->getElementType()->isSized()) {
for (unsigned i = 0; i != GEPOperands.size(); ++i)
- if (!isa<ConstantInt>(GEPOperands[i]) ||
- GEPOperands[i]->getType() == Type::Int1Ty)
+ if (!isa<ConstantInt>(GEPOperands[i]))
GEPOperands[i] =
Constant::getNullValue(GEPOperands[i]->getType());
int64_t Offset =
@@ -610,14 +609,12 @@
if (GEP1Ops.size() > MinOperands) {
for (unsigned i = FirstConstantOper; i != MaxOperands; ++i)
if (isa<ConstantInt>(GEP1Ops[i]) &&
- GEP1Ops[i]->getType() != Type::Int1Ty &&
!cast<Constant>(GEP1Ops[i])->isNullValue()) {
// Yup, there's a constant in the tail. Set all variables to
// constants in the GEP instruction to make it suiteable for
// TargetData::getIndexedOffset.
for (i = 0; i != MaxOperands; ++i)
- if (!isa<ConstantInt>(GEP1Ops[i]) ||
- GEP1Ops[i]->getType() == Type::Int1Ty)
+ if (!isa<ConstantInt>(GEP1Ops[i]))
GEP1Ops[i] = Constant::getNullValue(GEP1Ops[i]->getType());
// Okay, now get the offset. This is the relative offset for the full
// instruction.
@@ -670,7 +667,7 @@
const Value *Op2 = i < GEP2Ops.size() ? GEP2Ops[i] : 0;
// If they are equal, use a zero index...
if (Op1 == Op2 && BasePtr1Ty == BasePtr2Ty) {
- if (!isa<ConstantInt>(Op1) || Op1->getType() == Type::Int1Ty)
+ if (!isa<ConstantInt>(Op1))
GEP1Ops[i] = GEP2Ops[i] = Constant::getNullValue(Op1->getType());
// Otherwise, just keep the constants we have.
} else {
More information about the llvm-commits
mailing list