Add a couple more nodes that are easy to handle

llvm-svn: 22850
This commit is contained in:
Nate Begeman 2005-08-18 00:53:47 +00:00
parent 74d5529b88
commit 457367f14c
1 changed files with 11 additions and 0 deletions

View File

@ -310,6 +310,11 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
Select(N->getOperand(0)), Select(N->getOperand(1)));
break;
}
case ISD::FABS: {
CurDAG->SelectNodeTo(N, N->getValueType(0), PPC::FABS,
Select(N->getOperand(0)));
break;
}
case ISD::FNEG: {
SDOperand Val = Select(N->getOperand(0));
MVT::ValueType Ty = N->getValueType(0);
@ -338,6 +343,12 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
CurDAG->SelectNodeTo(N, Ty, PPC::FNEG, Val);
break;
}
case ISD::FSQRT: {
MVT::ValueType Ty = N->getValueType(0);
CurDAG->SelectNodeTo(N, Ty, Ty == MVT::f64 ? PPC::FSQRT : PPC::FSQRTS,
Select(N->getOperand(0)));
break;
}
case ISD::RET: {
SDOperand Chain = Select(N->getOperand(0)); // Token chain.