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 | b37ef71ce1578c8536e7d47d636ecb6663a4e28a (patch) | |
| tree | 9988bfe38ab5f359d74824bf5f75a8b784cbf72b /llvm/lib/Transforms | |
| parent | 513f0238d8eddfffab17f40929f6696c9b04bcbb (diff) | |
| download | bcm5719-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/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 3 |
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))) |

