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 | c8a9fafcfcd0ac03182c46c04c4f4d1521f6a671 (patch) | |
| tree | 7231f1989579784c4ec5db3fd2e9001da3d0b8c2 /llvm/lib/Bytecode | |
| parent | f8592bdea530f5eaf0106fa29c3fd3e4397fc22c (diff) | |
| download | bcm5719-llvm-c8a9fafcfcd0ac03182c46c04c4f4d1521f6a671.tar.gz bcm5719-llvm-c8a9fafcfcd0ac03182c46c04c4f4d1521f6a671.zip | |
Make sure intrinsic auto-upgrade is invoked correctly.
llvm-svn: 25434
Diffstat (limited to 'llvm/lib/Bytecode')
| -rw-r--r-- | llvm/lib/Bytecode/Reader/Reader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index 2ec670e6621..55e16062306 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/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; |

