llvm-project/llvm/test/Transforms/ConstProp
Bixia Zheng bdf0230cff [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

llvm-svn: 356781
2019-03-22 16:37:37 +00:00
..
2002-05-03-DivideByZeroException.ll
2002-05-03-NotOperator.ll
2002-09-03-SetCC-Bools.ll
2003-05-12-DivideError.ll
2005-01-28-SetCCGEP.ll
2006-11-30-vector-cast.ll
2006-12-01-TruncBoolBug.ll
2006-12-01-bool-casts.ll
2007-02-05-BitCast.ll
2007-02-23-sdiv.ll
2008-07-07-VectorCompare.ll
2009-06-20-constexpr-zero-lhs.ll
2009-09-01-GEP-Crash.ll
InsertElement.ll
avx512.ll [X86] Add constant folding for AVX512 versions of scalar floating point to integer conversion intrinsics. 2018-08-12 22:09:54 +00:00
basictest.ll
bitcast.ll [ConstantFold] Fix misfolding fcmp of a ConstantExpr NaN with itself. 2019-02-19 21:21:54 +00:00
bswap.ll
calls-math-finite.ll Disable calls to *_finite and other glibc-only functions on Musl. 2018-11-06 18:23:32 +00:00
calls.ll [ConstantFolding] Fix GetConstantFoldFPValue to avoid cast overflow. 2019-03-22 16:37:37 +00:00
cast.ll
constant-expr.ll
convert-from-fp16.ll
div-zero.ll
extractvalue.ll
float-to-ptr-cast.ll
insertvalue.ll
loads.ll [ConstantFolding] Handle leading zero-size elements in load folding 2018-12-11 20:29:16 +00:00
logicaltest.ll
overflow-ops.ll [ConstantFolding] Fold undef for integer intrinsics 2019-01-11 21:18:00 +00:00
phi.ll
remtest.ll
shift.ll
sse.ll
trunc_vec.ll