llvm-project/llvm/test/Transforms/NewGVN
Florian Hahn d236e1c7b6 [InstSimplify/NewGVN] Add option to control the use of undef.
Making use of undef is not safe if the simplification result is not used
to replace all uses of the result. This leads to problems in NewGVN,
which does not replace all uses in the IR directly. See PR33165 for more
details.

This patch adds an option to SimplifyQuery to disable the use of undef.

Note that I've only guarded uses if isa<UndefValue>/m_Undef where
SimplifyQuery is currently available. If we agree on the general
direction, I'll update the remaining uses.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D84792
2020-08-09 19:16:56 +01:00
..
2007-07-25-DominatedLoop.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2007-07-25-InfiniteLoop.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
2007-07-25-Loop.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2007-07-25-NestedLoop.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2007-07-25-SinglePredecessor.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2007-07-26-InterlockingLoops.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
2007-07-26-NonRedundant.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2007-07-26-PhiErasure.ll [AssumeBundles] add cannonicalisation to the assume builder 2020-06-19 10:32:26 +02:00
2007-07-30-PredIDom.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2007-07-31-NoDomInherit-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
2007-07-31-RedundantPhi.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
2008-02-12-UndefLoad-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
2008-02-13-NewPHI.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2008-07-02-Unreachable.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
2008-12-09-SelfRemove.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2008-12-12-RLE-Crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2008-12-14-rle-reanalyze.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2008-12-15-CacheVisited.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2009-01-21-SortInvalidation.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2009-01-22-SortInvalidation.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2009-03-10-PREOnVoid.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2009-07-13-MemDepSortFail.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2009-11-12-MemDepMallocBitCast.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2010-03-31-RedundantPHIs.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
2010-05-08-OneBit.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2010-11-13-Simplify.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
2011-04-27-phioperands.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2011-07-07-MatchIntrinsicExtract.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2011-09-07-TypeIdFor.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
2012-05-22-PreCrash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2016-08-30-MaskedScatterGather-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
MemdepMiscompile.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
addrspacecast.ll NewGVN: Handle addrspacecast 2019-06-05 21:15:52 +00:00
assume-equal-xfail.ll [NewGVN] Separate passing assume tests (NFC) 2020-07-13 21:07:03 +02:00
assume-equal.ll [PredicateInfo] Place predicate info after assume 2020-07-13 21:10:11 +02:00
assumes.ll [PredicateInfo] Place predicate info after assume 2020-07-13 21:10:11 +02:00
basic-cyclic-opt.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
basic-undef-test.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
basic.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
big-endian.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
bitcast-of-call.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
br-identical.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
calloc-load-removal.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
calls-nonlocal-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
calls-readonly.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
commute.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
completeness.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
cond_br.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
cond_br2-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
condprop-xfail.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
condprop.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
crash-no-aa.ll [BasicAA] Rename -disable-basicaa to -disable-basic-aa to be consistent with the canonical name "basic-aa" 2020-06-26 20:55:44 -07:00
crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
cyclic-phi-handling.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
dbg-redundant-load.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
deadstore.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
debugloc-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
edge.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
eliminate-callsite-inline.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
eliminate-ssacopy.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
equivalent-phi.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
fence-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
flags-simplify.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
flags.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fold-const-expr.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fpmath.ll [NFC][NewGVN] Explicitly check fpmath metadata in fpmath.ll 2019-06-28 21:39:08 +00:00
funclet.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
int_sideeffect.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
invariant.group-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
invariant.start.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
lifetime-simple.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
load-constant-mem.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
load-from-unreachable-predecessor.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
loadforward.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
malloc-load-removal.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
memory-handling.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
metadata-nonnull.ll Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
metadata-simplify.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
no_speculative_loads_with_asan.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
noalias.ll Rename scoped-noalias -> scoped-noalias-aa 2020-07-24 12:14:27 -07:00
non-integral-pointers.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
non-local-offset.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
nonescaping-malloc-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
null-aliases-nothing.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
opt-remarks-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
pair_jumpthread.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
phi-edge-handling.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
phi-of-ops-move-block.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
phi-translate-partial-alias.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr10820-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
pr12979.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr14166-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
pr17732.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr17852.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr24397.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr24426.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr25440.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr28562.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr31472.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr31483.ll Re-land "[PowerPC] Remove QPX/A2Q BGQ/BGP CNK support" 2020-07-28 14:00:11 +00:00
pr31491.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr31501.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr31573.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr31594.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr31613.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr31682.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
pr31758.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32403.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32607.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32836.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32838.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32845.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32852.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32897.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32934.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32945.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr32952.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr33014.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr33086.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr33116.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr33165-distribute-undef.ll [InstSimplify/NewGVN] Add option to control the use of undef. 2020-08-09 19:16:56 +01:00
pr33185.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr33187.ll Require "target datalayout" to be at the beginning of an IR file. 2020-04-20 11:55:49 -07:00
pr33196.ll [NewPM] Add -basic-aa to pr33196.ll 2020-07-02 11:27:52 -07:00
pr33204.ll StoreInst should store Align, not MaybeAlign 2020-05-15 12:26:58 -07:00
pr33305.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
pr33367.ll AllocaInst should store Align instead of MaybeAlign. 2020-05-16 14:53:16 -07:00
pr33432.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr33461.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr33720.ll StoreInst should store Align, not MaybeAlign 2020-05-15 12:26:58 -07:00
pr34135.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr34430.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
pr34452.ll Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
pr35074.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr35125.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr43441.ll [NewGVN] Check that call has an access. 2019-10-15 17:25:36 +00:00
pre-compare.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pre-new-inst-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
predicates.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
preserve-metadata-for-predicate-replacements.ll [NewGVN] Add test to ensure metadata is preserved for ssa_copy (NFC) 2020-06-03 19:30:03 +01:00
propagate-ir-flags.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
range.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
readattrs.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
refine-stores.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
rle-must-alias-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
rle-no-phi-translate-xfail.ll [NewGVN] Rename xfail tests (NFC) 2020-07-13 21:07:03 +02:00
rle-nonlocal.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
rle.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
simp-to-self.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
stale-loop-info.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
storeoverstore.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
tbaa.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/{New,}GVN 2020-06-26 20:28:18 -07:00
todo-pr35074-phi-of-ops.ll [NewGVN] Require asserts for crashing tests. 2020-07-29 12:41:05 +01:00
todo-pr36335-phi-undef.ll [NewGVN] Add test cases for remaining known issues. 2020-07-28 20:33:04 +01:00
todo-pr37121-seens-this-value-a-lot.ll [NewGVN] Require asserts for crashing tests. 2020-07-29 12:41:05 +01:00
todo-pr42422-phi-of-ops.ll Fix typo in test. Thanks to Andrew Ng for spotting this! 2020-08-05 22:56:15 -07:00
unreachable_block_infinite_loop.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
verify-memoryphi.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
volatile-nonvolatile.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00