summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-06-29 17:37:07 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-06-29 17:37:07 +0000
commitb37ef71ce1578c8536e7d47d636ecb6663a4e28a (patch)
tree9988bfe38ab5f359d74824bf5f75a8b784cbf72b /llvm/lib
parent513f0238d8eddfffab17f40929f6696c9b04bcbb (diff)
downloadbcm5719-llvm-b37ef71ce1578c8536e7d47d636ecb6663a4e28a.tar.gz
bcm5719-llvm-b37ef71ce1578c8536e7d47d636ecb6663a4e28a.zip
ignore 'invoke new' in isInstructionTriviallyDead, since most callers are not ready to handle invokes. instcombine will take care of this.
llvm-svn: 159440
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index bed7d72fffc..e9097a4053c 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -265,7 +265,8 @@ bool llvm::isInstructionTriviallyDead(Instruction *I) {
return isa<UndefValue>(II->getArgOperand(1));
}
- if (isAllocLikeFn(I)) return true;
+ if (isAllocLikeFn(I))
+ return isa<CallInst>(I); // do not mess around with invoke here
if (CallInst *CI = isFreeCall(I))
if (Constant *C = dyn_cast<Constant>(CI->getArgOperand(0)))
OpenPOWER on IntegriCloud