summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-06-28 22:31:24 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-06-28 22:31:24 +0000
commit9ac4661afa65ac809c9cd562a25ee8cfb362cb83 (patch)
treee6d8923456f9348336b175c7bd3fe1bc03609dff /llvm/lib
parentec9653b363672487aaca905139d755cb837f36a3 (diff)
downloadbcm5719-llvm-9ac4661afa65ac809c9cd562a25ee8cfb362cb83.tar.gz
bcm5719-llvm-9ac4661afa65ac809c9cd562a25ee8cfb362cb83.zip
make instcombine produce calls to llvm.donothing instead of a random intrinsic
llvm-svn: 159384
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 07793ac6b5f..c5124bf7b28 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -1169,14 +1169,11 @@ Instruction *InstCombiner::visitMalloc(Instruction &MI) {
}
if (InvokeInst *II = dyn_cast<InvokeInst>(&MI)) {
- // Replace invoke with a NOOP intrinsic to maintain the original CFG
+ // Replace invoke with a NOP intrinsic to maintain the original CFG
Module *M = II->getParent()->getParent()->getParent();
- IntegerType *Ty = IntegerType::get(II->getContext(), 8);
- ConstantInt *CI = ConstantInt::get(Ty, 0);
- Value *Args[] = {CI, CI};
- Function *F = Intrinsic::getDeclaration(M, Intrinsic::expect, Ty);
- InvokeInst::Create(F, II->getNormalDest(), II->getUnwindDest(), Args,
- "dummy", II->getParent());
+ Function *F = Intrinsic::getDeclaration(M, Intrinsic::donothing);
+ InvokeInst::Create(F, II->getNormalDest(), II->getUnwindDest(),
+ ArrayRef<Value *>(), "", II->getParent());
}
return EraseInstFromFunction(MI);
}
OpenPOWER on IntegriCloud