diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-01-19 01:21:04 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-01-19 01:21:04 +0000 |
commit | e812fb230a9f21a43b6ee4947b1e714721a55b63 (patch) | |
tree | d6312c0575f34e1fed0dc0caf8d89bea4db1a0c4 /lib/Bytecode/Reader/Reader.cpp | |
parent | d615bd9013846fbc7a6c4b8922c0e6988b55a4c0 (diff) |
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/Reader/Reader.cpp')
-rw-r--r-- | lib/Bytecode/Reader/Reader.cpp | 5 |
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; |