From b37ef71ce1578c8536e7d47d636ecb6663a4e28a Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Fri, 29 Jun 2012 17:37:07 +0000 Subject: [PATCH] ignore 'invoke new' in isInstructionTriviallyDead, since most callers are not ready to handle invokes. instcombine will take care of this. llvm-svn: 159440 --- llvm/lib/Transforms/Utils/Local.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index bed7d72fffc6..e9097a4053c0 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(II->getArgOperand(1)); } - if (isAllocLikeFn(I)) return true; + if (isAllocLikeFn(I)) + return isa(I); // do not mess around with invoke here if (CallInst *CI = isFreeCall(I)) if (Constant *C = dyn_cast(CI->getArgOperand(0)))