aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PowerPC/PPCISelDAGToDAG.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index fded5bc373..4b1c63e2b2 100644
--- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -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.