summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-12-29 01:33:36 +0000
committerChris Lattner <sabre@nondot.org>2010-12-29 01:33:36 +0000
commit1be1fe033c49e836556f3b258e1207ced61ec4e4 (patch)
tree775aa3388f6f319d8aa5da62d4597eafaa288dac /llvm/lib
parent426e68f793c0b89809129e1657f3dfe1f85bd21f (diff)
downloadbcm5719-llvm-1be1fe033c49e836556f3b258e1207ced61ec4e4.tar.gz
bcm5719-llvm-1be1fe033c49e836556f3b258e1207ced61ec4e4.zip
fix PR8867: a crash handling fp128. Thanks to Nick for the testcase.
llvm-svn: 122613
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp
index 5c284b746de..27676562d4d 100644
--- a/llvm/lib/VMCore/ConstantFold.cpp
+++ b/llvm/lib/VMCore/ConstantFold.cpp
@@ -637,7 +637,7 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V,
case Instruction::SIToFP:
if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
APInt api = CI->getValue();
- APFloat apf(APInt::getNullValue(DestTy->getPrimitiveSizeInBits()));
+ APFloat apf(APInt::getNullValue(DestTy->getPrimitiveSizeInBits()), true);
(void)apf.convertFromAPInt(api,
opc==Instruction::SIToFP,
APFloat::rmNearestTiesToEven);
OpenPOWER on IntegriCloud