mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-26 06:04:47 +00:00
Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.
llvm-svn: 32495
This commit is contained in:
parent
8a830bc4a1
commit
aefab1a7c1
@ -4902,7 +4902,10 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
||||
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 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user