aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-09-30 18:19:03 +0000
committerDale Johannesen <dalej@apple.com>2007-09-30 18:19:03 +0000
commit88216af3ea4bb1c68a8793ed1d3b30308b64ab0e (patch)
treedb3b24ea0faceec5eb021615d89bf25953be1076 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentcce23a4c3585d9d7df538bbc71151624a18f40cd (diff)
Constant fold int-to-long-double conversions;
use APFloat for int-to-float/double; use round-to-nearest for these (implementation-defined, seems to match gcc). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42484 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 042868d7bb..e286eb0ec5 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1598,7 +1598,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
(void)apf.convertFromInteger(&Val,
MVT::getSizeInBits(Operand.getValueType()),
Opcode==ISD::SINT_TO_FP,
- APFloat::rmTowardZero);
+ APFloat::rmNearestTiesToEven);
return getConstantFP(apf, VT);
}
case ISD::BIT_CONVERT: