mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-12 13:24:29 +00:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user