Be conservative if getresult operand is neither call nor invoke.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2008-04-09 15:58:24 +00:00
parent a723d1e48f
commit d4e0af9f89

View File

@ -690,12 +690,13 @@ void SCCPSolver::visitGetResultInst(GetResultInst &GRI) {
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);