llvm-project/llvm/test/Transforms/NewGVN
Konstantina 5bc8791187 [NewGVN][PHIOFOPS] Bail out if an operand is in OpSafeForPHIOfOps but it is not safe for the current basic block.
NewGVN tables are not cleared out between the initial run of NewGVN and the verification. In case of phi-of-ops optimization, OpSafeForPHIOfOps goes out of sync between the two runs. One operand might not be safe for one basic block, but it might be safe for one of its successors. In this case, the operand will be added in OpSafeForPHIOfOps map. In verification phase, we reuse OpSafeForPHIOfOps without updating it again. As a result, the operand will be considered safe for phi-of-ops optimization even for the case that it is not. This patch fixes this problem.

Fix for 53807.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D130910
2022-08-17 18:57:46 -07:00
..
2007-07-25-DominatedLoop.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2007-07-25-InfiniteLoop.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
2007-07-25-Loop.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2007-07-25-NestedLoop.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2007-07-25-SinglePredecessor.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2007-07-26-InterlockingLoops.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
2007-07-26-NonRedundant.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2007-07-26-PhiErasure.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2007-07-30-PredIDom.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2007-07-31-NoDomInherit-xfail.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
2007-07-31-RedundantPhi.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
2008-02-12-UndefLoad-xfail.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2008-02-13-NewPHI.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2008-07-02-Unreachable.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
2008-12-09-SelfRemove.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2008-12-12-RLE-Crash.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2008-12-14-rle-reanalyze.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2008-12-15-CacheVisited.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2009-01-21-SortInvalidation.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2009-01-22-SortInvalidation.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2009-03-10-PREOnVoid.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2009-07-13-MemDepSortFail.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2009-11-12-MemDepMallocBitCast.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2010-03-31-RedundantPHIs.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
2010-05-08-OneBit.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2010-11-13-Simplify.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
2011-04-27-phioperands.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2011-07-07-MatchIntrinsicExtract.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2011-09-07-TypeIdFor.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
2012-05-22-PreCrash.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
2016-08-30-MaskedScatterGather-xfail-inseltpoison.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
2016-08-30-MaskedScatterGather-xfail.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
MemdepMiscompile.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
addrspacecast.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
assume-equal-xfail.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
assume-equal.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
assumes.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
basic-cyclic-opt.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
basic-undef-test.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
basic.ll [InstSimplify] fold 'xor X, poison' and 'div/rem X, poison' to poison 2022-01-30 10:46:54 +00:00
big-endian.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
bitcast-of-call.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
br-identical.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
calloc-load-removal.ll MemoryBuiltins: remove malloc-family funcs from list 2022-07-25 17:29:01 -04:00
calls-nonlocal-xfail.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
calls-readonly.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
commute.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
compare-condition-changes.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
completeness.ll [NewGVN] do phi(undef, x) -> x only if x is not poison 2022-01-29 21:43:57 +00:00
cond_br.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
cond_br2-xfail.ll
condprop-xfail.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
condprop.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
crash-no-aa.ll
crash.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
cyclic-phi-handling.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
dbg-redundant-load.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
deadstore.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
debugloc-xfail.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
edge.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
eliminate-callsite-inline.ll
eliminate-ssacopy.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
equivalent-phi.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
fence-xfail.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
flags-simplify.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
flags.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
fold-const-expr.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
fpmath.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
funclet.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
int_sideeffect.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
invariant.group.ll
invariant.start.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
lifetime-simple.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
load-constant-mem.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
load-from-unreachable-predecessor.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
loadforward.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
malloc-load-removal.ll MemoryBuiltins: remove malloc-family funcs from list 2022-07-25 17:29:01 -04:00
memory-handling.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
metadata-nonnull.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
metadata-simplify.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
no_speculative_loads_with_asan.ll [GVN][NewGVN] Regenerate no_speculative_loads_with_asan.ll tests 2022-04-27 10:45:39 +01:00
noalias.ll
non-integral-pointers.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
non-local-offset.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
nonescaping-malloc-xfail.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
null-aliases-nothing.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
opt-remarks-xfail.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pair_jumpthread.ll
phi-edge-handling.ll [NewGVN] do phi(undef, x) -> x only if x is not poison 2022-01-29 21:43:57 +00:00
phi-of-ops-loads.ll [NewGVN][PHIOFOPS] Bail out if an operand is in OpSafeForPHIOfOps but it is not safe for the current basic block. 2022-08-17 18:57:46 -07:00
phi-of-ops-move-block.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
phi-of-ops-simplification-dependencies.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
phi-of-ops-simplified-to-existing-value-then-changes-again.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
phi-translate-partial-alias.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr10820-xfail.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr12979.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr14166-xfail.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr17732.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr17852.ll
pr24397.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr24426.ll
pr25440.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr28562.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr31472.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr31483.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr31491.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr31501.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr31573.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr31594.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr31613.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr31613_2.ll
pr31682.ll [NewGVN] do phi(undef, x) -> x only if x is not poison 2022-01-29 21:43:57 +00:00
pr31758.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr32403.ll [NewGVN] do phi(undef, x) -> x only if x is not poison 2022-01-29 21:43:57 +00:00
pr32607.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr32836.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr32838.ll [NewGVN] do phi(undef, x) -> x only if x is not poison 2022-01-29 21:43:57 +00:00
pr32845.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr32852.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr32897.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr32934.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr32945.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr32952.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33014.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33086.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33116.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33165-distribute-undef.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33185.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33187.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33196.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
pr33204.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33305.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33367.ll
pr33432.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33461.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr33720.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr34135.ll [NewGVN] do phi(undef, x) -> x only if x is not poison 2022-01-29 21:43:57 +00:00
pr34430.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr34452.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr35074-phi-of-ops.ll Enable tests from rG8e67982384d4a11892c04d16c2d10d7533e56094 that seem to work now 2022-02-25 15:28:49 -05:00
pr35074.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr35125.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pr37121-seens-this-value-a-lot.ll Enable tests from rG8e67982384d4a11892c04d16c2d10d7533e56094 that seem to work now 2022-02-25 15:28:49 -05:00
pr42422-phi-of-ops.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
pr43441.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pre-compare.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
pre-new-inst-xfail.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
predicates.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
preserve-metadata-for-predicate-replacements.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
propagate-ir-flags.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
range.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
readattrs.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
refine-stores.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
rle-must-alias-xfail.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
rle-no-phi-translate-xfail.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
rle-nonlocal.ll [test][NewGVN] Use '-passes=newgvn' instead of '-basic-aa -newgvn' 2022-01-28 13:58:22 +01:00
rle.ll
simp-to-self.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
sq-ctxi.ll [NewGVN] add context instruction for SimplifyQuery 2022-06-22 12:25:24 +08:00
stale-loop-info.ll
storeoverstore.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
tbaa.ll
todo-pr36335-phi-undef.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
unreachable_block_infinite_loop.ll
verify-memoryphi.ll [test][NewGVN] Use -passes=newgvn instead of -newgvn 2022-01-28 13:58:22 +01:00
volatile-nonvolatile.ll