Skip to content

Commit b37ef71

Browse files
committed
ignore 'invoke new' in isInstructionTriviallyDead, since most callers are not ready to handle invokes. instcombine will take care of this.
llvm-svn: 159440
1 parent 513f023 commit b37ef71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Utils/Local.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ bool llvm::isInstructionTriviallyDead(Instruction *I) {
265265
return isa<UndefValue>(II->getArgOperand(1));
266266
}
267267

268-
if (isAllocLikeFn(I)) return true;
268+
if (isAllocLikeFn(I))
269+
return isa<CallInst>(I); // do not mess around with invoke here
269270

270271
if (CallInst *CI = isFreeCall(I))
271272
if (Constant *C = dyn_cast<Constant>(CI->getArgOperand(0)))

0 commit comments

Comments
 (0)