[llvm-commits] [llvm] r49430 - /llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Devang Patel
dpatel at apple.com
Wed Apr 9 08:58:24 PDT 2008
Author: dpatel
Date: Wed Apr 9 10:58:24 2008
New Revision: 49430
URL: http://llvm.org/viewvc/llvm-project?rev=49430&view=rev
Log:
Be conservative if getresult operand is neither call nor invoke.
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=49430&r1=49429&r2=49430&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Wed Apr 9 10:58:24 2008
@@ -690,12 +690,13 @@
unsigned Idx = GRI.getIndex();
Value *Aggr = GRI.getOperand(0);
Function *F = NULL;
- if (CallInst *CI = dyn_cast<CallInst>(Aggr))
+ if (CallInst *CI = dyn_cast<CallInst>(Aggr))
F = CI->getCalledFunction();
else if (InvokeInst *II = dyn_cast<InvokeInst>(Aggr))
F = II->getCalledFunction();
- assert (F && "Invalid GetResultInst operands!");
+ if (!F)
+ return;
std::multimap<Function*, LatticeValIndexed>::iterator It, E;
tie(It, E) = TrackedMultipleRetVals.equal_range(F);
More information about the llvm-commits
mailing list