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
This commit is contained in:
Chris Lattner
2005-08-26 21:23:58 +00:00
parent 050967c4d1
commit 8a2d3ca7df
4 changed files with 79 additions and 2 deletions

View File

@@ -1400,8 +1400,17 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
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: