1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/Transforms/IndVarSimplify
Philip Reames c08128ee52 [LoopDeletion] Handle inner loops w/untaken backedges
This builds on the restricted after initial revert form of D93906, and adds back support for breaking backedges of inner loops. It turns out the original invalidation logic wasn't quite right, specifically around the handling of LCSSA.

When breaking the backedge of an inner loop, we can cause blocks which were in the outer loop only because they were also included in a sub-loop to be removed from both loops. This results in the exit block set for our original parent loop changing, and thus a need for new LCSSA phi nodes.

This case happens when the inner loop has an exit block which is also an exit block of the parent, and there's a block in the child which reaches an exit to said block without also reaching an exit to the parent loop.

(I'm describing this in terms of the immediate parent, but the problem is general for any transitive parent in the nest.)

The approach implemented here involves a potentially expensive LCSSA rebuild.  Perf testing during review didn't show anything concerning, but we may end up needing to revert this if anyone encounters a practical compile time issue.

Differential Revision: https://reviews.llvm.org/D94378
2021-01-22 16:31:29 -08:00
..
AMDGPU
ARM
NVPTX
X86
2002-09-09-PointerIndVar.ll
2003-04-16-ExprAnalysis.ll
2003-09-23-NotAtTop.ll
2003-12-10-RemoveInstrCrash.ll
2003-12-15-Crash.ll
2004-03-10-PHIInsertionBug.ll
2004-04-05-InvokeCastCrash.ll
2004-04-07-ScalarEvolutionCrash.ll
2005-02-11-InvokeCrash.ll
2005-02-17-TruncateExprCrash.ll
2005-02-26-ExitValueCompute.ll
2005-06-15-InstMoveCrash.ll
2005-11-18-Crash.ll
2006-03-31-NegativeStride.ll
2006-06-16-Indvar-LCSSA-Crash.ll
2006-09-20-LFTR-Crash.ll
2006-12-10-BitCast.ll
2007-01-06-TripCount.ll
2007-06-06-DeleteDanglesPtr.ll
2007-11-23-BitcastCrash.ll
2008-06-15-SCEVExpanderBug.ll
2008-09-02-IVType.ll
2008-10-03-CouldNotCompute.ll
2008-11-25-APFloatAssert.ll
2009-04-22-IndvarCrash.ll
2009-04-27-Floating.ll
2009-05-24-useafterfree.ll
2011-09-10-widen-nsw.ll
2011-09-19-vectoriv.ll
2011-09-27-hoistsext.ll
2011-10-27-lftrnull.ll
2011-11-01-lftrptr.ll
2011-11-17-selfphi.ll
2012-10-19-congruent-constant.ll
2014-06-21-congruent-constant.ll
2020-12-15-trunc-bug-expensive-range-inference.ll
ada-loops.ll
addrec_no_exec_on_every_iteration.ll
ashr-tripcount.ll
avoid-i0.ll
backedge-on-min-max.ll
bec-cmp.ll
canonicalize-cmp.ll
casted-argument.ll
checks_against_min_value.ll
const_phi.ll
constant_result.ll
constant-fold.ll
crash.ll
dangling-use.ll
divide-pointer.ll
dont-recompute.ll
drop-exact.ll
elim-extend.ll
eliminate-comparison.ll
eliminate-exit-no-dl.ll
eliminate-exit.ll
eliminate-max.ll
eliminate-overflow-modified.ll
eliminate-rem.ll
eliminate-sat.ll
exit_value_test2.ll
exit_value_test3.ll
exit_value_tests.ll
floating-point-iv.ll
full_widening.ll
indirectbr.ll
infer-poison-flags.ll
interesting-invoke-use.ll
iterationCount_zext_or_trunc.ll
iv-fold.ll
iv-sext.ll
iv-widen-elim-ext.ll
iv-zext.ll
lcssa-preservation.ll
lftr_disabled.ll
lftr-address-space-pointers.ll
lftr-dead-ivs.ll
lftr-multi-exit.ll
lftr-pr20680.ll
lftr-pr31181.ll
lftr-pr41998.ll
lftr-promote.ll
lftr-reuse.ll
lftr.ll
loop_evaluate7.ll
loop_evaluate8.ll
loop_evaluate9.ll
loop_evaluate11.ll
loop_evaluate_1.ll
loop_evaluate_2.ll
loop_evaluate_3.ll
loop_evaluate_4.ll
loop_evaluate_5.ll
loop_evaluate_6.ll
loop-predication.ll
lrev-existing-umin.ll
masked-iv.ll
monotonic_checks.ll
no-iv-rewrite.ll
phi-uses-value-multiple-times.ll
post-inc-range.ll
pr18223.ll
pr22222.ll
pr24783.ll
pr24952.ll
pr25060.ll
pr25578.ll
pr26974.ll
pr28705.ll
pr32045.ll
pr38674.ll
pr38855.ll
pr39673.ll
pr40454.ll
pr45835.ll
predicated_ranges.ll
preserve-memoryssa.ll
preserve-signed-wrap.ll
promote-iv-to-eliminate-casts.ll
replace-loop-exit-folds.ll
replace-sdiv-by-udiv.ll
replace-srem-by-urem.ll
rewrite-loop-exit-value.ll
rewrite-loop-exit-values-phi.ll
rlev-add-me.ll
scev-expander-preserve-lcssa.ll
scevexpander-phi-base-case.ll
sentinel.ll
shared-exit-between-nested-loop.ll
sharpen-range.ll
shrunk-constant.ll
signed-trip-count.ll
single-element-range.ll
sink-alloca.ll
sink-from-preheader.ll
sink-trapping.ll
strengthen-overflow.ll
tripcount_compute.ll
tripcount_infinite.ll
trivial-checks.ll
udiv-invariant-but-traps.ll
udiv.ll
ult-sub-to-eq.ll
use-range-metadata.ll
variable-stride-ivs-0.ll
widen-i32-i8ptr.ll
widen-loop-comp.ll
zext-nuw.ll