summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-17 19:35:42 +0000
committerChris Lattner <sabre@nondot.org>2005-11-17 19:35:42 +0000
commitbca0be812d34e7e13f2463dead9422e6b859018c (patch)
treeaa86c673b8abccb2837f4a8800b3a0117d06ae34 /llvm/lib/Transforms
parent6ab87fa3602311b550df65b52ba641064d2b71f8 (diff)
downloadbcm5719-llvm-bca0be812d34e7e13f2463dead9422e6b859018c.tar.gz
bcm5719-llvm-bca0be812d34e7e13f2463dead9422e6b859018c.zip
This was checking the wrong GEP expression. Fixing this fixes a gccas crash
compiling mysql reported by Ted Kremenek. llvm-svn: 24402
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index f2b812d437d..bf735aff9ea 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -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)) {
OpenPOWER on IntegriCloud