[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Evan Cheng
evan.cheng at apple.com
Tue Dec 12 13:51:32 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.434 -> 1.435
---
Log message:
Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.
---
Diffs of the changes: (+20 -1)
LegalizeDAG.cpp | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.434 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.435
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.434 Tue Dec 12 15:32:44 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Dec 12 15:51:17 2006
@@ -4902,7 +4902,10 @@
case ISD::UDIV: Lo = ExpandLibCall("__udivdi3", Node, Hi); break;
case ISD::SREM: Lo = ExpandLibCall("__moddi3" , Node, Hi); break;
case ISD::UREM: Lo = ExpandLibCall("__umoddi3", Node, Hi); break;
-
+
+ case ISD::FNEG:
+ Lo = ExpandLibCall(((VT == MVT::f32) ? "__negsf2" : "__negdf2"), Node, Hi);
+ break;
case ISD::FADD:
Lo = ExpandLibCall(((VT == MVT::f32) ? "__addsf3" : "__adddf3"), Node, Hi);
break;
@@ -4921,6 +4924,22 @@
case ISD::FP_ROUND:
Lo = ExpandLibCall("__truncdfsf2", Node, Hi);
break;
+ case ISD::SINT_TO_FP:
+ if (Node->getOperand(0).getValueType() == MVT::i64)
+ Lo = ExpandLibCall(((VT == MVT::f32) ? "__floatdisf" : "__floatdidf"),
+ Node, Hi);
+ else
+ Lo = ExpandLibCall(((VT == MVT::f32) ? "__floatsisf" : "__floatsidf"),
+ Node, Hi);
+ break;
+ case ISD::UINT_TO_FP:
+ if (Node->getOperand(0).getValueType() == MVT::i64)
+ Lo = ExpandLibCall(((VT == MVT::f32) ? "__floatundisf" : "__floatundidf"),
+ Node, Hi);
+ else
+ Lo = ExpandLibCall(((VT == MVT::f32) ? "__floatunsisf" : "__floatunsidf"),
+ Node, Hi);
+ break;
}
// Make sure the resultant values have been legalized themselves, unless this
More information about the llvm-commits
mailing list