summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 66fbe1482d9..ccc4a9cc864 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -3552,8 +3552,7 @@ Instruction *InstCombiner::MatchBSwap(BinaryOperator &I) {
FnName = "llvm.bswap.i64";
else
assert(0 && "Unknown integer type!");
- Function *F = M->getOrInsertFunction(FnName, I.getType(), I.getType(), NULL);
-
+ Constant *F = M->getOrInsertFunction(FnName, I.getType(), I.getType(), NULL);
return new CallInst(F, V);
}
@@ -6953,7 +6952,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
Name = "llvm.memcpy.i32";
else
Name = "llvm.memcpy.i64";
- Function *MemCpy = M->getOrInsertFunction(Name,
+ Constant *MemCpy = M->getOrInsertFunction(Name,
CI.getCalledFunction()->getFunctionType());
CI.setOperand(0, MemCpy);
Changed = true;
OpenPOWER on IntegriCloud