diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-03-03 01:34:17 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-03-03 01:34:17 +0000 |
| commit | 681ef2f083b997832c91526574a09122d6efa173 (patch) | |
| tree | e3a0c25f06ec8fbcaabd2db0b07e362625d18701 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
| parent | 7f731c5db9bfec451f1e36fd11030ad166d59770 (diff) | |
| download | bcm5719-llvm-681ef2f083b997832c91526574a09122d6efa173.tar.gz bcm5719-llvm-681ef2f083b997832c91526574a09122d6efa173.zip | |
Change this to work with renamed intrinsics.
llvm-svn: 26484
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 4449cc78bab..6d006b1815d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -5286,7 +5286,13 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) { if (GlobalVariable *GVSrc = dyn_cast<GlobalVariable>(MMI->getSource())) if (GVSrc->isConstant()) { Module *M = CI.getParent()->getParent()->getParent(); - Function *MemCpy = M->getOrInsertFunction("llvm.memcpy", + const char *Name; + if (CI.getCalledFunction()->getFunctionType()->getParamType(3) == + Type::UIntTy) + Name = "llvm.memcpy.i32"; + else + Name = "llvm.memcpy.i64"; + Function *MemCpy = M->getOrInsertFunction(Name, CI.getCalledFunction()->getFunctionType()); CI.setOperand(0, MemCpy); Changed = true; |

