summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index da822e2d075..d8e04e9b435 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -2625,6 +2625,12 @@ void DAGTypeLegalizer::ExpandIntRes_LLROUND_LLRINT(SDNode *N, SDValue &Lo,
EVT RetVT = N->getValueType(0);
TargetLowering::MakeLibCallOptions CallOptions;
CallOptions.setSExt(true);
+
+ if (getTypeAction(VT) == TargetLowering::TypeSoftenFloat) {
+ Op = GetSoftenedFloat(Op);
+ CallOptions.setTypeListBeforeSoften(VT, RetVT, true);
+ }
+
SplitInteger(TLI.makeLibCall(DAG, LC, RetVT, Op, CallOptions, dl).first,
Lo, Hi);
}
OpenPOWER on IntegriCloud