diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index b3e18f60dad9..961c12d7a771 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -53,9 +53,6 @@ static cl::opt EnableValueProp("enable-value-prop", cl::Hidden); static cl::opt EnableLegalizeTypes("enable-legalize-types", cl::Hidden); -static cl::opt -DisableCorrectBranchFolding("disable-correct-folding", cl::init(false), - cl::Hidden); #ifndef NDEBUG @@ -1638,14 +1635,12 @@ void SelectionDAGLowering::visitSwitchCase(SelectionDAGISel::CaseBlock &CB) { // If the branch was constant folded, fix up the CFG. if (BrCond.getOpcode() == ISD::BR) { - if (!DisableCorrectBranchFolding) - CurMBB->removeSuccessor(CB.FalseBB); + CurMBB->removeSuccessor(CB.FalseBB); DAG.setRoot(BrCond); } else { // Otherwise, go ahead and insert the false branch. if (BrCond == getControlRoot()) - if (!DisableCorrectBranchFolding) - CurMBB->removeSuccessor(CB.TrueBB); + CurMBB->removeSuccessor(CB.TrueBB); if (CB.FalseBB == NextBlock) DAG.setRoot(BrCond);