llvm-project/llvm/test/Transforms/InstSimplify
Sanjay Patel eb731b09f3 [InstSimplify] fold and/or of fcmp ord/uno when operand is known nnan
The 'ord' and 'uno' predicates have a logic operation for NAN built into their definitions:

FCMP_ORD   =  7,  ///< 0 1 1 1    True if ordered (no nans)
FCMP_UNO   =  8,  ///< 1 0 0 0    True if unordered: isnan(X) | isnan(Y)

So we can simplify patterns like this:

(fcmp ord (known NNAN), X) && (fcmp ord X, Y) --> fcmp ord X, Y
(fcmp uno (known NNAN), X) || (fcmp uno X, Y) --> fcmp uno X, Y

It might be better to split this into (X uno 0) | (Y uno 0) as a canonicalization, but that
would be another patch.

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

llvm-svn: 318627
2017-11-19 15:34:27 +00:00
..
2010-12-20-Boolean.ll
2011-01-14-Thread.ll
2011-02-01-Vector.ll
2011-09-05-InsertExtractValue.ll
2011-10-27-BinOpCrash.ll
2011-11-23-MaskedBitsCrash.ll
2013-04-19-ConstantFoldingCrash.ll
AndOrXor.ll [InstSimplify] Make m_Not work for xor -1, X 2017-05-18 20:27:32 +00:00
add-mask.ll
addsub.ll [InstSimplify] Add test cases for mixing add/sub i1 with xor of i1. Seems we can simplify in one direction but not the other. 2017-04-06 05:48:06 +00:00
and-icmps-same-ops.ll
assume.ll
bitcast-vector-fold.ll
bitreverse.ll
bswap.ll
call-callconv.ll
call.ll InstSimplify: canonicalize is idempotent 2017-09-07 01:21:43 +00:00
cast.ll
compare.ll [InstCombine] remove unnecessary vector select fold; NFCI 2017-08-30 14:04:57 +00:00
dead-code-removal.ll
div.ll [InstSimplify] fix some test names; NFC 2017-09-11 20:38:31 +00:00
exact-nsw-nuw.ll [InstSimplify] fold sdiv/srem based on compare of dividend and divisor 2017-09-14 14:59:07 +00:00
fast-math.ll
fdiv.ll [InstSimplify] add constant folding for fdiv/frem 2017-04-01 19:05:11 +00:00
floating-point-arithmetic.ll
floating-point-compare.ll [InstSimplify] regenerate checks; NFC 2017-09-02 14:38:15 +00:00
fold-builtin-fma.ll
gep.ll
icmp-bool-constant.ll [InstSimplify] handle all icmp i1 X, C in one place; NFCI 2017-05-17 20:27:55 +00:00
icmp-constant.ll [ValueTracking] return zero when there's conflict in known bits of a shift (PR34838) 2017-10-12 17:31:46 +00:00
icmp-ranges.ll [InstSimplify] use ConstantRange to simplify or-of-icmps 2017-05-07 15:11:40 +00:00
implies.ll
load-relative-32.ll
load-relative.ll
load.ll
logic-of-fcmps.ll [InstSimplify] fold and/or of fcmp ord/uno when operand is known nnan 2017-11-19 15:34:27 +00:00
maxmin.ll
mul.ll [InstSimplify] Teach SimplifyMulInst to recognize vectors of i1 as And. Not just scalar i1. 2017-04-06 17:33:37 +00:00
negate.ll
noalias-ptr.ll
or-icmps-same-ops.ll
or.ll [InstSimplify] Use m_APInt instead of m_ConstantInt in ((V + N) & C1) | (V & C2) handling in order to support splat vectors. 2017-05-26 19:03:53 +00:00
past-the-end.ll
phi.ll
pr28725.ll
pr33957.ll [ConstantFolder] Don't try to fold gep when the idx is a vector. 2017-07-27 22:20:44 +00:00
ptr_diff.ll
reassociate.ll
rem.ll [InstSimplify] fix some test names; NFC 2017-09-11 20:38:31 +00:00
require-dominator.ll
returned.ll
select.ll [InstSimplify] teach SimplifySelectInst() to fold more vector selects 2017-10-02 23:43:52 +00:00
shift-128-kb.ll
shift-knownbits.ll
shr-nop.ll
shufflevector.ll InstructionSimplify: Relanding r301766 2017-05-07 18:16:37 +00:00
signed-div-rem.ll [InstSimplify] fold sdiv/srem based on compare of dividend and divisor 2017-09-14 14:59:07 +00:00
simplify-nested-bitcast.ll [InstSimplify] Constant fold the new GEP in SimplifyGEPInst. 2017-06-06 10:17:14 +00:00
undef.ll
vec-cmp.ll
vector_gep.ll [InstSimplify] Constant fold the new GEP in SimplifyGEPInst. 2017-06-06 10:17:14 +00:00
vector_ptr_bitcast.ll