Add a couple more nodes that are easy to handle

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22850 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nate Begeman 2005-08-18 00:53:47 +00:00
parent b5a0668d43
commit 6a7d61179c

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.