From: Chris Lattner Date: Wed, 14 Jul 2004 20:27:12 +0000 (+0000) Subject: Simplify logic. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f70770abd53cf275368acd08f1f494301f4ce138;p=oota-llvm.git Simplify logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14825 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index d578c9adf3c..c533f6d5ef8 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -516,13 +516,13 @@ CheckGEPInstructions(const Type* BasePtr1Ty, std::vector &GEP1Ops, // Is there anything to check? if (GEP1Ops.size() > MinOperands) { for (unsigned i = FirstConstantOper; i != MaxOperands; ++i) - if (isa(GEP1Ops[i]) && !isa(GEP1Ops[i]) && + if (isa(GEP1Ops[i]) && !cast(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(GEP1Ops[i]) || isa(GEP1Ops[i])) + if (!isa(GEP1Ops[i])) GEP1Ops[i] = Constant::getNullValue(GEP1Ops[i]->getType()); // Okay, now get the offset. This is the relative offset for the full // instruction.