Make sure intrinsic auto-upgrade is invoked correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2006-01-19 01:21:04 +00:00
parent d615bd9013
commit e812fb230a
4 changed files with 3005 additions and 2217 deletions

View File

@ -857,6 +857,11 @@ void BytecodeReader::ParseInstruction(std::vector<unsigned> &Oprnds,
}
Result = new CallInst(F, Params);
if (CallInst* newCI = UpgradeIntrinsicCall(cast<CallInst>(Result))) {
Result->replaceAllUsesWith(newCI);
Result->eraseFromParent();
Result = newCI;
}
if (isTailCall) cast<CallInst>(Result)->setTailCall();
if (CallingConv) cast<CallInst>(Result)->setCallingConv(CallingConv);
break;