aboutsummaryrefslogtreecommitdiffstats
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
commit60db7966acc9462e62ccfd5075aece683149505b (patch)
tree44598cbbc922365c54e4f540bc1eb0618b51573c
parente2ec14090999a45583ed0f6e6f1a1effc510f4f3 (diff)
downloadexternal_llvm-60db7966acc9462e62ccfd5075aece683149505b.zip
external_llvm-60db7966acc9462e62ccfd5075aece683149505b.tar.gz
external_llvm-60db7966acc9462e62ccfd5075aece683149505b.tar.bz2
ignore 'invoke new' in isInstructionTriviallyDead, since most callers are not ready to handle invokes. instcombine will take care of this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159440 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Utils/Local.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp
index bed7d72..e9097a4 100644
--- a/lib/Transforms/Utils/Local.cpp
+++ b/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)))