diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-29 17:37:07 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-29 17:37:07 +0000 |
commit | 60db7966acc9462e62ccfd5075aece683149505b (patch) | |
tree | 44598cbbc922365c54e4f540bc1eb0618b51573c /lib | |
parent | e2ec14090999a45583ed0f6e6f1a1effc510f4f3 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index bed7d72fff..e9097a4053 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))) |