llvm-project/llvm/test/Transforms/SimpleLoopUnswitch
Alina Sbirlea db04ff4b6b [SimpleLoopUnswitch] Add non-empty unreachable block check to exit cases removed.
Summary:
Update check to include the check for unreachable.

Basic blocks ending in unreachable are special cased, as these blocks may be already unswitched. Before this patch this check is only done for the default destination.
The condition for the exit cases and the default case must be the same, because we should never leave edges from the switch instruction to a basic block that we are unswitching. In PR45355 we still have a remaining edge (that we're attempting to remove from the DT) because its the default edge to an unreachable-terminated block where we unswitch a case edge to that block.

Resolves PR45355.

Reviewers: chandlerc

Subscribers: hiraditya, uabelho, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78279
2020-05-13 12:38:37 -07:00
..
2006-06-13-SingleEntryPHI.ll
2006-06-27-DeadSwitchCase.ll
2007-05-09-Unreachable.ll
2007-05-09-tl.ll
2007-07-12-ExitDomInfo.ll
2007-07-13-DomInfo.ll
2007-07-18-DomInfo.ll
2007-08-01-Dom.ll
2007-08-01-LCSSA.ll
2007-10-04-DomFrontier.ll
2008-06-02-DomInfo.ll
2008-06-17-DomFrontier.ll
2010-11-18-LCSSA.ll
2011-06-02-CritSwitch.ll
2011-09-26-EHCrash.ll
2012-04-02-IndirectBr.ll
2012-04-30-LoopUnswitch-LPad-Crash.ll
2012-05-20-Phi.ll
2015-09-18-Addrspace.ll
LIV-loop-condtion.ll
basictest-profmd.ll
basictest.ll
cleanuppad.ll
copy-metadata.ll
crash.ll
delete-dead-blocks.ll
exponential-behavior.ll
exponential-nontrivial-unswitch-nested.ll Revert "[SimpleLoopUnswitch] Fix introduction of UB when hoisted condition may be undef or poison" 2020-02-28 11:10:46 +09:00
exponential-nontrivial-unswitch-nested2.ll Revert "[SimpleLoopUnswitch] Fix introduction of UB when hoisted condition may be undef or poison" 2020-02-28 11:10:46 +09:00
exponential-nontrivial-unswitch.ll
exponential-nontrivial-unswitch2.ll
exponential-switch-unswitch.ll Revert "[SimpleLoopUnswitch] Fix introduction of UB when hoisted condition may be undef or poison" 2020-02-28 11:10:46 +09:00
formDedicatedAfterTrivial1.ll
formDedicatedAfterTrivial2.ll
formDedicatedAfterTrivial3.ll
guards.ll Revert "[SimpleLoopUnswitch] Fix introduction of UB when hoisted condition may be undef or poison" 2020-02-28 11:10:46 +09:00
infinite-loop.ll
msan.ll
nontrivial-unswitch-cost.ll Revert "[SimpleLoopUnswitch] Fix introduction of UB when hoisted condition may be undef or poison" 2020-02-28 11:10:46 +09:00
nontrivial-unswitch-redundant-switch.ll
nontrivial-unswitch.ll Revert "[SimpleLoopUnswitch] Fix introduction of UB when hoisted condition may be undef or poison" 2020-02-28 11:10:46 +09:00
pr37888.ll
preserve-analyses.ll
preserve-scev-exiting-multiple-loops.ll
trivial-unswitch-iteration.ll
trivial-unswitch-profmd.ll
trivial-unswitch.ll [SimpleLoopUnswitch] Add non-empty unreachable block check to exit cases removed. 2020-05-13 12:38:37 -07:00
update-scev.ll