eliminate uses of SelectionDAG::getBR2Way_CC
llvm-svn: 25767
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index a96c59b..218e130 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2092,9 +2092,16 @@
if (SCCC && SCCC->isNullValue())
return DAG.getNode(ISD::BR, MVT::Other, Chain, N5);
// fold to a simpler setcc
- if (SCC.Val && SCC.getOpcode() == ISD::SETCC)
- return DAG.getBR2Way_CC(Chain, SCC.getOperand(2), SCC.getOperand(0),
- SCC.getOperand(1), N4, N5);
+ if (SCC.Val && SCC.getOpcode() == ISD::SETCC) {
+ std::vector<SDOperand> Ops;
+ Ops.push_back(Chain);
+ Ops.push_back(SCC.getOperand(2));
+ Ops.push_back(SCC.getOperand(0));
+ Ops.push_back(SCC.getOperand(1));
+ Ops.push_back(N4);
+ Ops.push_back(N5);
+ return DAG.getNode(ISD::BRTWOWAY_CC, MVT::Other, Ops);
+ }
return SDOperand();
}