Revert the new EH instructions
[oota-llvm.git] / lib / Transforms / Scalar / SCCP.cpp
index c625b0f3362a19baf552fe3abab8a39efc03e629..4d3a708fa20ecc1614af841518d43a51453c7537 100644 (file)
@@ -539,9 +539,9 @@ void SCCPSolver::getFeasibleSuccessors(TerminatorInst &TI,
     return;
   }
 
-  // Unwinding instructions successors are always executable.
-  if (TI.isExceptional()) {
-    Succs.assign(TI.getNumSuccessors(), true);
+  if (isa<InvokeInst>(TI)) {
+    // Invoke instructions successors are always executable.
+    Succs[0] = Succs[1] = true;
     return;
   }
 
@@ -605,8 +605,8 @@ bool SCCPSolver::isEdgeFeasible(BasicBlock *From, BasicBlock *To) {
     return BI->getSuccessor(CI->isZero()) == To;
   }
 
-  // Unwinding instructions successors are always executable.
-  if (TI->isExceptional())
+  // Invoke instructions successors are always executable.
+  if (isa<InvokeInst>(TI))
     return true;
 
   if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {