Files
Bixia Zheng 4b3e2db5d4 [ConstantFolding] Fix GetConstantFoldFPValue to avoid cast overflow.
Summary:
In C++, the behavior of casting a double value that is beyond the range
of a single precision floating-point to a float value is undefined. This
change replaces such a cast with APFloat::convert to convert the value,
which is consistent with how we convert a double value to a half value.

Reviewers: sanjoy

Subscribers: lebedev.ri, sanjoy, jlebar, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59500

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356781 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-22 16:37:37 +00:00
..