This was checking the wrong GEP expression. Fixing this fixes a gccas crash

compiling mysql reported by Ted Kremenek.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24402 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-11-17 19:35:42 +00:00
parent 9ba13e4aef
commit ceda605fd7

View File

@ -162,7 +162,7 @@ void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN,
if (CE->getOperand(NumOps-1)->isNullValue()) {
// Check to make sure the last index really is an array index.
gep_type_iterator GTI = gep_type_begin(GEPI);
for (unsigned i = 1, e = GEPI->getNumOperands()-1;
for (unsigned i = 1, e = CE->getNumOperands()-1;
i != e; ++i, ++GTI)
/*empty*/;
if (isa<SequentialType>(*GTI)) {