llvm-mirror/test/Transforms/ConstProp
Nikita Popov 8654837372 [ConstantFolding] Fold undef for integer intrinsics
This fixes https://bugs.llvm.org/show_bug.cgi?id=40110.

This implements handling of undef operands for integer intrinsics in
ConstantFolding, in particular for the bitcounting intrinsics (ctpop,
cttz, ctlz), the with.overflow intrinsics, the saturating math
intrinsics and the funnel shift intrinsics.

The undef behavior follows what InstSimplify does for the general cas
e of non-constant operands. For the bitcount intrinsics (where
InstSimplify doesn't do undef handling -- there cannot be a combination
of an undef + non-constant operand) I'm using a 0 result if the intrinsic
is defined for zero and undef otherwise.

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

llvm-svn: 350971
2019-01-11 21:18:00 +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-bool-casts.ll
2006-12-01-TruncBoolBug.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
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 Disable calls to *_finite and other glibc-only functions on Musl. 2018-11-06 18:23:32 +00:00
calls.ll ConstProp: Split x86 SSE intrinsic tests out of calls.ll 2017-05-13 05:52:17 +00:00
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
InsertElement.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 [X86] Replace 'REQUIRES: x86' in tests with 'REQUIRES: x86-registered-target' which seems to be the correct way to make them run on an x86 build. 2017-06-04 08:21:58 +00:00
trunc_vec.ll