1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/test/Transforms/LoopUnroll
Philip Reames a4f9bca98e Do actual DCE in LoopUnroll (try 4)
Turns out simplifyLoopIVs sometimes returns a non-dead instruction in it's DeadInsts out param.  I had done a bit of NFC cleanup which was only NFC if simplifyLoopIVs obeyed it's documentation.  I'm simplfy dropping that part of the change.

Commit message from try 3:

Recommitting after fixing a bug found post commit. Amusingly, try 1 had been correct, and by reverting to incorporate last minute review feedback, I introduce the bug. Oops. :)

Original commit message:

The problem was that recursively deleting an instruction can delete instructions beyond the current iterator (via a dead phi), thus invalidating iteration. Test case added in LoopUnroll/dce.ll to cover this case.

LoopUnroll does a limited DCE pass after unrolling, but if you have a chain of dead instructions, it only deletes the last one. Improve the code to recursively delete all trivially dead instructions.

Differential Revision: https://reviews.llvm.org/D102511
2021-05-19 10:25:31 -07:00
..
AArch64 Do actual DCE in LoopUnroll (try 4) 2021-05-19 10:25:31 -07:00
AMDGPU [AMDGPU][CostModel] Refine cost model for control-flow instructions. 2021-04-10 09:20:24 +03:00
ARM [ARM] Allow v6m runtime loop unrolling 2021-04-01 21:21:40 +01:00
Hexagon
PowerPC Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
WebAssembly Reland "[Libcalls, Attrs] Annotate libcalls with noundef" 2021-02-20 06:18:48 +01:00
X86 Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
2004-05-13-DontUnrollTooMuch.ll
2005-03-06-BadLoopInfoUpdate.ll
2006-08-24-MultiBlockLoop.ll
2007-04-16-PhiUpdate.ll
2007-05-05-UnrollMiscomp.ll
2007-05-09-UnknownTripCount.ll
2007-11-05-Crash.ll
2011-08-08-PhiUpdate.ll
2011-08-09-IVSimplify.ll
2011-08-09-PhiUpdate.ll
2011-10-01-NoopTrunc.ll
2012-04-09-unroll-indirectbr.ll [NFCI][SimplifyCFG] Mark all the SimplifyCFG tests that already don't invalidate DomTree as such 2020-12-17 01:03:49 +03:00
assume-timeout.ll [ValueTracking] add scan limit for assumes 2021-02-15 15:24:20 -05:00
basic.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
callbr.ll
complete_unroll_profitability_with_assume.ll
convergent.ll
dce.ll Do actual DCE in LoopUnroll (try 4) 2021-05-19 10:25:31 -07:00
debug-info.ll
disable_nonforced_count.ll
disable_nonforced_enable.ll
disable_nonforced_full.ll
disable_nonforced.ll
disable-full-unroll-by-opt.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
disable-loop-unrolling_forced.ll
ephemeral.ll
epilog_const_phi.ll
followup.ll
full-unroll-bad-cost.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
full-unroll-crashers.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
full-unroll-heuristics-2.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
full-unroll-heuristics-cmp.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
full-unroll-heuristics-dce.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
full-unroll-heuristics-geps.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
full-unroll-heuristics-phi-prop.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
full-unroll-heuristics.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
full-unroll-invariant.ll Do actual DCE in LoopUnroll (try 4) 2021-05-19 10:25:31 -07:00
full-unroll-keep-first-exit.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
FullUnroll.ll [test] Fix FullUnroll.ll 2020-09-17 15:56:13 -07:00
high-cost-trip-count-computation.ll
ignore-annotation-intrinsic-cost.ll
invalidate_right_loop.ll
loop-remarks-with-hotness.ll
loop-remarks.ll
noalias.ll [LoopUnroll] Use llvm.experimental.noalias.scope.decl for duplicating noalias metadata as needed 2021-01-24 13:48:20 +01:00
nonlatchcondbr.ll Do actual DCE in LoopUnroll (try 4) 2021-05-19 10:25:31 -07:00
not-rotated.ll
opt-levels.ll [NewPM] Run non-trivial loop unswitching under -O2/3/s/z 2021-01-12 11:04:40 -08:00
optsize-loop-size.ll Do actual DCE in LoopUnroll (try 4) 2021-05-19 10:25:31 -07:00
partial-unroll-const-bounds.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
partial-unroll-dead-instructions.ll
partially-unroll-unconditional-latch.ll
peel-loop2.ll
peel-loop-conditions-pgo-1.ll
peel-loop-conditions-pgo-2.ll
peel-loop-conditions.ll Loop peeling: check that latch is conditional branch 2021-01-20 11:01:16 -05:00
peel-loop-inner.ll [SimplifyCFG] FoldBranchToCommonDest(): re-lift restrictions on liveout uses of bonus instructions 2021-01-23 01:29:05 +03:00
peel-loop-irreducible.ll
peel-loop-negative.ll
peel-loop-nests.ll
peel-loop-noalias-scope-decl.ll [LoopPeel] Use llvm.experimental.noalias.scope.decl for duplicating noalias metadata as needed. 2021-02-01 10:01:17 +01:00
peel-loop-not-forced.ll
peel-loop-pgo-deopt-idom-2.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
peel-loop-pgo-deopt-idom.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
peel-loop-pgo-deopt.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
peel-loop-pgo.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
peel-loop-scev-invalidate.ll
peel-loop.ll [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
pr10813.ll
pr11361.ll
pr14167.ll Re-land "[PowerPC] Remove QPX/A2Q BGQ/BGP CNK support" 2020-07-28 14:00:11 +00:00
pr18861.ll
pr27157.ll
pr28132.ll
pr31718.ll [LoopUnroll] Make some tests more robust (NFC) 2021-04-17 20:59:20 +02:00
pr33437.ll
pr45939-peel-count-and-complete-unroll.ll Do actual DCE in LoopUnroll (try 4) 2021-05-19 10:25:31 -07:00
rebuild_lcssa.ll
revisit.ll [NewPM][PassInstrument] Add PrintPass callback to StandardInstrumentations 2020-07-30 10:07:57 -07:00
runtime-epilog-debuginfo.ll
runtime-li.ll [LoopUnroll] Make some tests more robust (NFC) 2021-04-17 20:59:20 +02:00
runtime-loop1.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
runtime-loop2.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
runtime-loop3.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
runtime-loop4.ll
runtime-loop5.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
runtime-loop-at-most-two-exits.ll [LoopUnrollRuntime] Add option to assume the non latch exit block to be 2021-03-07 23:48:00 +00:00
runtime-loop-branchweight.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
runtime-loop-multiexit-dom-verify.ll [LoopUnroll] Make some tests more robust (NFC) 2021-04-17 20:59:20 +02:00
runtime-loop-multiple-exits.ll [Value][InstCombine] Fix one-use checks in PHI-of-op -> Op-of-PHI[s] transforms to be one-user checks 2020-08-26 20:20:41 +03:00
runtime-loop-non-exiting-latch.ll
runtime-loop.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
runtime-multiexit-heuristic.ll [NFC][LoopUnroll] Add -unroll-runtime-other-exit-predictable=false in 2021-03-07 23:51:09 +00:00
runtime-small-upperbound.ll [NFC] run update test script 2020-08-17 13:54:28 +01:00
runtime-unroll-assume-no-remainder.ll [SCEV] Apply loop guards to divisibility tests 2021-02-02 08:09:39 +02:00
runtime-unroll-remainder.ll
scevunroll.ll Do actual DCE in LoopUnroll (try 4) 2021-05-19 10:25:31 -07:00
shifted-tripcount.ll
tripcount-overflow.ll
unloop.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
unroll-after-peel.ll [LoopUnroll] Fix a crash 2021-01-11 10:19:26 +07:00
unroll-cleanup.ll
unroll-cleanuppad.ll
unroll-count.ll
unroll-header-exiting-with-phis-multiple-exiting-blocks.ll [LoopUnroll] Add multi-exit test which does not exit through latch. 2021-05-17 17:08:15 +01:00
unroll-header-exiting-with-phis.ll Do actual DCE in LoopUnroll (try 4) 2021-05-19 10:25:31 -07:00
unroll-heuristics-pgo.ll
unroll-loop-invalidation.ll [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose 2021-05-07 21:51:47 -07:00
unroll-maxcount.ll
unroll-opt-attribute.ll [PGO][PGSO] Let unroll hints take precedence over PGSO. 2021-01-07 10:10:31 -08:00
unroll-pragmas-disabled.ll
unroll-pragmas.ll
unroll-preserve-scev-lcssa.ll
unroll-unconditional-latch.ll Do actual DCE in LoopUnroll (try 4) 2021-05-19 10:25:31 -07:00
update-loop-info-in-subloops.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00
wrong_assert_in_peeling.ll [NewPM][LoopUnroll] Rename unroll* to loop-unroll* 2020-06-26 09:28:32 -07:00