[SimplifyCFG] Don't DCE catchret because the successor is unreachable
[oota-llvm.git] / lib / Transforms / Utils / SimplifyCFG.cpp
index e435537c3a7d7c3db7f23c2c5c2e1ca4292c3ad8..69c08e55283a05c2a0808bfbd3ba5f51661fcd2a 100644 (file)
@@ -3178,8 +3178,7 @@ bool SimplifyCFGOpt::SimplifyUnreachable(UnreachableInst *UI) {
                isa<CatchEndPadInst>(TI) || isa<TerminatePadInst>(TI)) {
       removeUnwindEdge(TI->getParent());
       Changed = true;
-    } else if (isa<CleanupReturnInst>(TI) || isa<CleanupEndPadInst>(TI) ||
-               isa<CatchReturnInst>(TI)) {
+    } else if (isa<CleanupReturnInst>(TI) || isa<CleanupEndPadInst>(TI)) {
       new UnreachableInst(TI->getContext(), TI);
       TI->eraseFromParent();
       Changed = true;