summaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-01-19 01:21:04 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-01-19 01:21:04 +0000
commite812fb230a9f21a43b6ee4947b1e714721a55b63 (patch)
treed6312c0575f34e1fed0dc0caf8d89bea4db1a0c4 /lib/Bytecode
parentd615bd9013846fbc7a6c4b8922c0e6988b55a4c0 (diff)
downloadllvm-e812fb230a9f21a43b6ee4947b1e714721a55b63.tar.gz
llvm-e812fb230a9f21a43b6ee4947b1e714721a55b63.tar.bz2
llvm-e812fb230a9f21a43b6ee4947b1e714721a55b63.tar.xz
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
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Reader/Reader.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index 2ec670e662..55e1606230 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -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;