[llvm-commits] [llvm] r73007 - /llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Nick Lewycky
nicholas at mxc.ca
Sat Jun 6 16:13:08 PDT 2009
Author: nicholas
Date: Sat Jun 6 18:13:08 2009
New Revision: 73007
URL: http://llvm.org/viewvc/llvm-project?rev=73007&view=rev
Log:
Don't crash on multiple return value with no obvious inserted value.
Fixes PR4314.
Modified:
llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=73007&r1=73006&r2=73007&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Sat Jun 6 18:13:08 2009
@@ -639,8 +639,8 @@
DenseMap<std::pair<Function*, unsigned>, LatticeVal>::iterator
It = TrackedMultipleRetVals.find(std::make_pair(F, i));
if (It == TrackedMultipleRetVals.end()) break;
- Value *Val = FindInsertedValue(I.getOperand(0), i);
- mergeInValue(It->second, F, getValueState(Val));
+ if (Value *Val = FindInsertedValue(I.getOperand(0), i))
+ mergeInValue(It->second, F, getValueState(Val));
}
}
}
More information about the llvm-commits
mailing list