diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2008-07-16 10:47:35 +0000 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2008-07-16 10:47:35 +0000 |
commit | dddc827125d307d8e992339d00ce4a6e3fe21e73 (patch) | |
tree | 32551e380e024e321d600325dfa7a8384090571d /lib/Analysis/ValueTracking.cpp | |
parent | 17991c3234aeeb0475feb9d30e4bc37ffadd9338 (diff) |
Don't use ++idx_begin when I actually mean idx_begin + 1, especially since we
also use *idx_begin in the same expression, giving unpredictable results.
This fixes this bug: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-July/015877.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | lib/Analysis/ValueTracking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index e7e291fb92..e35f0d0fce 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/lib/Analysis/ValueTracking.cpp @@ -864,7 +864,7 @@ Value *llvm::FindInsertedValue(Value *V, const unsigned *idx_begin, else if (Constant *C = dyn_cast<Constant>(V)) { if (isa<ConstantArray>(C) || isa<ConstantStruct>(C)) // Recursively process this constant - return FindInsertedValue(C->getOperand(*idx_begin), ++idx_begin, idx_end, + return FindInsertedValue(C->getOperand(*idx_begin), idx_begin + 1, idx_end, InsertBefore); } else if (InsertValueInst *I = dyn_cast<InsertValueInst>(V)) { // Loop the indices for the insertvalue instruction in parallel with the |