implement SELECT_CC fully for the DAG->DAG isel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23101 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 934f811..4c06e3d 100644
--- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -1400,8 +1400,17 @@
Tmp.getValue(1));
break;
}
-
- assert(0 && "Select_cc not implemented yet!");
+
+ SDOperand CCReg = SelectCC(Select(N->getOperand(0)),
+ Select(N->getOperand(1)), CC);
+ unsigned BROpc = getBCCForSetCC(CC);
+
+ bool isFP = MVT::isFloatingPoint(N->getValueType(0));
+ unsigned SelectCCOp = isFP ? PPC::SELECT_CC_FP : PPC::SELECT_CC_Int;
+ CurDAG->SelectNodeTo(N, SelectCCOp, N->getValueType(0), CCReg,
+ Select(N->getOperand(2)), Select(N->getOperand(3)),
+ getI32Imm(BROpc));
+ break;
}
case ISD::CALLSEQ_START: