ignore 'invoke new' in isInstructionTriviallyDead, since most callers are not ready to handle invokes. instcombine will take care of this.

llvm-svn: 159440
This commit is contained in:
Nuno Lopes 2012-06-29 17:37:07 +00:00
parent 513f0238d8
commit b37ef71ce1
1 changed files with 2 additions and 1 deletions

View File

@ -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)))