llvm-project/llvm/test/Transforms/InstSimplify
Matt Arsenault 841a0edd03 ConstantFolding: Constant fold some canonicalizes
+/-0 is obviously foldable. Other non-special, non-subnormal
values are also probably OK. For denormal values, check
the calling function's denormal mode. For now, don't fold
denormals to the input for IEEE mode because as far as I know
the langref is still pretending LLVM's float isn't IEEE.

Also folds undef to 0, although NaN may make more sense. Skips
folding nans and infinities, although it should be OK to fold those
in a future change.
2022-11-18 10:35:19 -08:00
..
ConstProp Use opt -passes=<name> instead of opt -name 2022-11-08 12:15:42 +01:00
X86 [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
2010-12-20-Boolean.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
2011-01-14-Thread.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
2011-02-01-Vector.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
2011-09-05-InsertExtractValue.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
2011-10-27-BinOpCrash.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
2011-11-23-MaskedBitsCrash.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
2013-04-19-ConstantFoldingCrash.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
AndOrXor.ll [InstSimplify] restrict logic fold with partial undef vector 2022-11-14 12:09:23 -05:00
abs_intrinsic.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
add-mask.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
add.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
add_vp.ll [VP] Add test to show optimization opportunities 2022-07-14 12:36:46 +02:00
addsub.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
and-icmps-same-ops.ll [InstSimplify] use isImpliedCondition() instead of semi-duplicated code 2022-08-05 10:59:09 -04:00
and-or-icmp-ctpop.ll [InstSimplify] Fold (ctpop(X) == N) || (X != 0) into X != 0 where N > 0 2022-04-04 23:23:34 +09:00
and-or-icmp-min-max.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
and-or-icmp-nullptr.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
and-or-icmp-zero.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
and-or-implied-cond.ll [ValueTracking] Handle and/or on RHS of isImpliedCondition() 2022-05-16 16:30:26 +02:00
and.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
assume-non-zero.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
assume_icmp.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
bitcast-vector-fold.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
bitreverse-fold.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
bitreverse.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
bswap.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
call.ll InstSimplify: Fold arithmetic_fence as idempotent 2022-11-15 22:29:34 -08:00
canonicalize.ll ConstantFolding: Constant fold some canonicalizes 2022-11-18 10:35:19 -08:00
cast-unsigned-icmp-cmp-0.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
cast.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
cmp-alloca-offsets.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
cmp-vec-fast-path.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
cmp_ext.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
cmp_of_min_max.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
compare.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
constant-fold-fp-denormal.ll [InstructionSimplify] handle denormal input for fcmp 2022-07-01 03:51:28 -04:00
constantfold-add-nuw-allones-to-allones.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
constantfold-shl-nuw-C-to-C.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
constfold-constrained.ll [ConstantFolding] Fix folding of constrained compare intrinsics 2022-02-27 10:19:19 +07:00
dead-code-removal.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
distribute.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
div-by-0-guard-before-smul_ov-not.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
div-by-0-guard-before-smul_ov.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
div-by-0-guard-before-umul_ov-not.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
div-by-0-guard-before-umul_ov.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
div.ll [ConstFold] Salvage some div/rem folding test (NFC) 2022-07-06 10:03:03 +02:00
exact-nsw-nuw.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
extract-element.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
extract-vector.ll [IR] Move vector.insert/vector.extract out of experimental namespace 2022-06-27 10:48:45 +00:00
fast-math-strictfp.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fast-math.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fcmp-select.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fcmp.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fdiv-strictfp.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fdiv.ll InstSimplify: Fold fdiv nnan ninf x, 0 -> poison 2022-11-07 08:43:22 -08:00
floating-point-arithmetic-strictfp.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
floating-point-arithmetic.ll [InstSimplify] add test for fsub with inf operand; NFC 2022-11-11 09:17:20 -05:00
floating-point-compare.ll ValueTracking: Look through copysign in isKnownNeverInfinity 2022-11-17 08:52:09 -08:00
fminmax-folds.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fold-intrinsics.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
fold-vscale.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fp-nan.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fp-undef-poison-strictfp.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fp-undef-poison.ll [InstSimplify] add test for fsub with inf operand; NFC 2022-11-11 09:17:20 -05:00
fptoi-range.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
fptoi-sat.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
freeze-noundef.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
freeze.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
gc_relocate.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
gep.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
icmp-abs-nabs.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
icmp-bool-constant.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
icmp-constant.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
icmp-not-bool-constant.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
icmp-ranges.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
icmp.ll [InstSimplify] allow poison/undef in constant match for "C - X ==/!= X -> false/true" 2022-09-06 08:19:30 -04:00
implies.ll [InstSimplify] sle on i1 also encodes implication 2022-08-15 08:27:23 -07:00
insert-vector.ll [IR] Move vector.insert/vector.extract out of experimental namespace 2022-06-27 10:48:45 +00:00
insertelement.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
insertvalue.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
invalid-load-operand-infinite-loop.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
invariant.group-load.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
known-never-nan.ll ValueTracking: Look through fneg in isKnownNeverNaN 2022-11-17 08:35:49 -08:00
known-non-zero-opaque-ptrs.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
known-non-zero.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
load-relative-32.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
load-relative.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
load.ll ConstantFolding: fold OOB accesses to poison instead of undef 2022-07-30 15:20:32 +01:00
log-exp-intrinsic.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
log2-pow2-intrinsic.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
log10-pow10-intrinsic.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
logic-of-fcmps.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
maxmin.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
maxmin_intrinsics.ll [InstSimplify] don't commute constant expression operand in min/max calls 2022-09-26 16:01:09 -04:00
mul.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
named-vector-shuffle-reverse.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
negate.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
noalias-ptr.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
null-ptr-is-valid-attribute.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
null-ptr-is-valid.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
opaque-ptr.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
or-icmps-same-ops.ll [InstSimplify] use isImpliedCondition() instead of semi-duplicated code 2022-08-05 10:59:09 -04:00
or.ll [InstSimplify] (~A & B) | ~(A | B) --> ~A with logical and 2022-11-07 10:03:18 +00:00
past-the-end.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
phi-cse.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
phi.ll [ConstExpr] Remove div/rem constant expressions 2022-07-06 10:11:34 +02:00
pr28725.ll [IR] Remove support for extractvalue constant expression 2022-06-28 10:40:17 +02:00
pr33957.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
pr49495.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
ptr_diff.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
reassociate.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
redundant-null-check-in-uadd_with_overflow-of-nonnull-ptr.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
rem.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
require-dominator.ll [Tests] Remove unnecessary bitcasts from opaque pointer tests (NFC) 2022-06-22 14:15:46 +02:00
result-of-add-of-negative-is-non-zero-and-no-underflow.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
result-of-usub-by-nonzero-is-non-zero-and-no-overflow.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
result-of-usub-is-non-zero-and-no-overflow.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
returned.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
round-intrinsics.ll [InstSimplify] fold FP rounding intrinsic with rounded operand 2022-07-31 10:00:27 -04:00
saturating-add-sub.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
sdiv.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
select-and-cmp.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
select-implied.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
select-inseltpoison.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
select-logical.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
select-maxmin.ll [InstSimplify] look through vector select (shuffle) in min/max fold 2022-09-30 08:27:00 -04:00
select-or-cmp.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
select.ll [InstSimplify] Support vectors in simplifyWithOpReplaced() 2022-09-22 10:45:42 +02:00
shift-128-kb.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
shift-knownbits.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
shift.ll [InstSimplify] fold scalable vectors with over-shift splat constant to poison 2022-08-07 16:26:05 -04:00
shr-nop.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
shr-scalar-vector-consistency.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
shufflevector-inseltpoison.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
shufflevector.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
signed-div-rem.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
simplify-nested-bitcast.ll [Tests] Remove unnecessary bitcasts from opaque pointer tests (NFC) 2022-06-22 14:15:46 +02:00
smul_fix.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
srem.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
strictfp-fadd.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
strictfp-fsub.ll [FPEnv][InstSimplify] 0.0 - -X ==> X 2022-08-11 11:35:33 -04:00
strictfp-sqrt-nonneg.ll [FPEnv][InstSimplify] Teach CannotBeNegativeZero() about constrained intrinsics. 2022-03-18 10:24:48 -04:00
sub.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00
undef.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
vec-cmp.ll [NFCI] Regenerate instsimplify test checks 2022-04-03 20:55:15 +02:00
vector-inseltextelt.ll [instsimplify] Move (extelt (inselt Vec, Value, Index), Index) -> Value from InstCombine 2022-10-17 15:22:06 -07:00
vector_gep.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
vector_ptr_bitcast.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
vscale-inseltpoison.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
vscale.ll [InstSimplify] Convert tests to opaque pointers (NFC) 2022-06-10 17:16:28 +02:00
xor.ll [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC 2022-02-07 14:26:58 +01:00