diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-14 20:27:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-14 20:27:12 +0000 |
commit | cbdf371d30ba8dc36443d6374d506f9f54666fac (patch) | |
tree | 353cf011e9245cca425349f5703d9232573fe44b /llvm/lib/Analysis/BasicAliasAnalysis.cpp | |
parent | 47fb34c00ae5705e76046926ba85cde19c7ba9be (diff) | |
download | bcm5719-llvm-cbdf371d30ba8dc36443d6374d506f9f54666fac.tar.gz bcm5719-llvm-cbdf371d30ba8dc36443d6374d506f9f54666fac.zip |
Simplify logic.
llvm-svn: 14825
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index d578c9adf3c..c533f6d5ef8 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -516,13 +516,13 @@ CheckGEPInstructions(const Type* BasePtr1Ty, std::vector<Value*> &GEP1Ops, // Is there anything to check? if (GEP1Ops.size() > MinOperands) { for (unsigned i = FirstConstantOper; i != MaxOperands; ++i) - if (isa<Constant>(GEP1Ops[i]) && !isa<ConstantExpr>(GEP1Ops[i]) && + if (isa<ConstantInt>(GEP1Ops[i]) && !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<Constant>(GEP1Ops[i]) || isa<ConstantExpr>(GEP1Ops[i])) + 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. |