[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Mar 2 17:34:29 PST 2006
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.446 -> 1.447
---
Log message:
Change this to work with renamed intrinsics.
---
Diffs of the changes: (+7 -1)
InstructionCombining.cpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.446 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.447
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.446 Thu Mar 2 00:50:58 2006
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Mar 2 19:34:17 2006
@@ -5286,7 +5286,13 @@
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;
More information about the llvm-commits
mailing list