diff options
Diffstat (limited to 'llvm/lib/VMCore/ConstantFold.cpp')
| -rw-r--r-- | llvm/lib/VMCore/ConstantFold.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp index 9a91dafab2f..eb58f7907c7 100644 --- a/llvm/lib/VMCore/ConstantFold.cpp +++ b/llvm/lib/VMCore/ConstantFold.cpp @@ -637,9 +637,7 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V, case Instruction::SIToFP: if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { APInt api = CI->getValue(); - const uint64_t zero[] = {0, 0}; - APFloat apf = APFloat(APInt(DestTy->getPrimitiveSizeInBits(), - 2, zero)); + APFloat apf(APInt::getNullValue(DestTy->getPrimitiveSizeInBits())); (void)apf.convertFromAPInt(api, opc==Instruction::SIToFP, APFloat::rmNearestTiesToEven); |

