aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/IndVarSimplify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index bf735aff9e..72ddb07d1e 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -161,7 +161,7 @@ void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN,
assert(NumOps > 1 && "CE folding didn't work!");
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);
+ gep_type_iterator GTI = gep_type_begin(CE);
for (unsigned i = 1, e = CE->getNumOperands()-1;
i != e; ++i, ++GTI)
/*empty*/;