[llvm-commits] [llvm] r53670 - /llvm/trunk/lib/Analysis/ValueTracking.cpp
Matthijs Kooijman
matthijs at stdin.nl
Wed Jul 16 03:47:36 PDT 2008
Author: matthijs
Date: Wed Jul 16 05:47:35 2008
New Revision: 53670
URL: http://llvm.org/viewvc/llvm-project?rev=53670&view=rev
Log:
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
Modified:
llvm/trunk/lib/Analysis/ValueTracking.cpp
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=53670&r1=53669&r2=53670&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Wed Jul 16 05:47:35 2008
@@ -864,7 +864,7 @@
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
More information about the llvm-commits
mailing list