aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index 0c1d7f73ae..d8b8566193 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -196,7 +196,7 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, const Constant *V,
uint32_t DestBitWidth = cast<IntegerType>(DestTy)->getBitWidth();
APFloat::opStatus status = V.convertToInteger(x, DestBitWidth,
opc==Instruction::FPToSI,
- APFloat::rmNearestTiesToEven);
+ APFloat::rmTowardZero);
if (status!=APFloat::opOK && status!=APFloat::opInexact)
return 0; // give up
APInt Val(DestBitWidth, 2, x);