llvm-project/llvm/test/Transforms/ConstProp
Craig Topper 484b342c68 [X86] Add constant folding for AVX512 versions of scalar floating point to integer conversion intrinsics.
Summary:
We've supported constant folding for sse versions for many years. This patch adds support for the avx512 versions including unsigned with the default rounding mode. We could probably do more with other roundings modes and SAE in the future.

The test cases are largely based on the sse.ll test cases. But I did add some test cases to ensure the unsigned versions don't accept negative values. Also checked the bounds of f64->i32 conversions to make sure unsigned has a larger positive range than signed.

Reviewers: RKSimon, spatel, chandlerc

Reviewed By: RKSimon

Subscribers: llvm-commits

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

llvm-svn: 339529
2018-08-12 22:09:54 +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
2007-11-23-cttz.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
bswap.ll
calls-math-finite.ll [ConstProp] Fix calls-math-finite.ll on FreeBSD 2018-07-26 06:24:11 +00:00
calls.ll
cast.ll Make uitofp and sitofp defined on overflow. 2018-06-14 22:58:48 +00:00
constant-expr.ll
convert-from-fp16.ll
div-zero.ll
extractvalue.ll
float-to-ptr-cast.ll
insertvalue.ll
loads.ll
logicaltest.ll
overflow-ops.ll
phi.ll
remtest.ll
shift.ll
sse.ll
trunc_vec.ll