llvm-project/llvm/test/Transforms
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
..
ADCE [ADCE] Fix incorrect reporting of CFG changes 2020-04-14 20:26:13 +07:00
AddDiscriminators Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
AggressiveInstCombine [AggressiveInstCombine] Add test with baseline CHECKs for aggressive inst combine for ICmp instruction. 2020-02-12 15:09:38 +02:00
AlignmentFromAssumptions [AlignmentFromAssumptions] Fix a SCEV assertion resulting from address space differences. 2020-03-29 01:26:31 -05:00
ArgumentPromotion [X86][ArgumentPromotion] Allow Argument Promotion if caller and callee disagree on 512-bit vectors support if the arguments are scalar. 2020-04-24 15:47:02 -07:00
AtomicExpand Handle part-word LL/SC in atomic expansion pass 2020-04-28 10:07:39 -05:00
Attributor [Attributor][FIX] Stabilize the state of AAReturnedValues each update 2020-05-12 21:00:30 -05:00
BDCE Clang-trunk Generates Wrong Debug values with -O1 2019-11-21 13:53:10 -08:00
BlockExtractor Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""" 2020-02-13 10:16:06 -08:00
BranchFolding
CallSiteSplitting [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
CalledValuePropagation
CanonicalizeAliases
CodeExtractor [CodeExtractor] Fix extraction of a value used only by intrinsics outside of region 2020-04-25 11:44:47 +03:00
CodeGenPrepare [x86][CGP] enable target hook to sink funnel shift intrinsic's splatted shift amount 2020-05-12 18:40:40 -04:00
ConstProp [ConstProp] Add test for bitcast to gep fold; NFC 2020-03-04 18:27:20 +01:00
ConstantHoisting Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
ConstantMerge
Coroutines [Coroutines] Remove alignment check in shouldBeMustTail 2020-04-07 09:07:34 +08:00
CorrelatedValuePropagation [ValueLattice] Merging unknown with empty CR is unknown. 2020-04-25 13:43:34 +01:00
CrossDSOCFI
DCE Re-commit: Mark values as trivially dead when their only use is a start or end lifetime intrinsic. 2020-05-08 12:24:10 -07:00
DeadArgElim [NFC] Fix trivial typos in comments 2020-01-06 10:50:26 +00:00
DeadStoreElimination Re-commit: Mark values as trivially dead when their only use is a start or end lifetime intrinsic. 2020-05-08 12:24:10 -07:00
DivRemPairs [ValueTracking] Fix crash in isGuaranteedNotToBeUndefOrPoison when V is in an unreachable block 2020-05-13 10:16:47 +09:00
EarlyCSE [AssumeBundles] Prevent generation of some redundant assumes 2020-05-10 19:23:59 +02:00
EliminateAvailableExternally
EntryExitInstrumenter [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
ExpandMemCmp [ExpandMemCmp] Allow overlaping loads in the zero-relational case. 2020-04-02 11:20:47 +02:00
FixIrreducible FixIrreducible: don't crash when moving a child loop 2020-04-22 07:47:30 +05:30
Float2Int
ForcedFunctionAttrs
FunctionAttrs [Attributor] Copy or port test cases related to Attributor to` Attributor` test folder 2019-12-02 15:36:29 +00:00
FunctionImport Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""" 2020-02-13 10:16:06 -08:00
GCOVProfiling [gcov] Default coverage version to '408*' and delete CC1 option -coverage-exit-block-before-body 2020-05-12 09:14:03 -07:00
GVN Reapply [InstSimplify] Remove known bits constant folding 2020-05-08 10:24:53 +02:00
GVNHoist Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
GVNSink Fix another instance where a variable was renamed in the generated LLVM IR. [NFC] 2020-03-23 22:53:29 -07:00
GlobalDCE [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables 2020-01-23 11:36:01 -08:00
GlobalMerge
GlobalOpt [GlobalOpt] Explicitly set alignment of bool load/store operations. 2020-04-12 16:03:12 -07:00
GlobalSplit [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables 2020-01-23 11:36:01 -08:00
GuardWidening [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
HardwareLoops [ARM] Replace arm vendor with none. NFC 2020-04-22 18:19:35 +01:00
HotColdSplit [HotColdSplit] Mark entire function cold when entry block is cold 2020-02-17 15:57:50 -08:00
IPConstantProp [Attributor][NFC] Remove obsolete option from tests 2020-04-21 15:22:10 -05:00
IRCE [IRCE] Use SCEVExpander to modify loop bound 2020-02-06 12:44:43 +03:00
IndVarSimplify Revert "[SCEV] rewriteLoopExitValues(): even if have hard uses, still rewrite if cheap (PR44668)" 2020-04-03 20:15:04 +03:00
IndirectBrExpand
InferAddressSpaces
InferFunctionAttrs [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
Inline [InlineCost] Addressing a very strict assert check in CostAnnotationWriter::emitInstructionAnnot 2020-04-30 15:38:36 +00:00
InstCombine [InstCombine] Add vector tests for the or(shl(zext(x),32)|zext(y)) concat combines 2020-05-13 18:48:02 +01:00
InstMerge
InstNamer
InstSimplify Reapply [InstSimplify] Remove known bits constant folding 2020-05-08 10:24:53 +02:00
InterleavedAccess [ARM] Disable VLD4 under MVE 2019-12-08 10:37:29 +00:00
Internalize
JumpThreading Fix MSan false positive due to select folding. 2020-03-31 15:25:42 -07:00
LCSSA [SSAUpdater] Don't call ValueIsRAUWd upon single use replacement 2020-01-23 15:53:53 +07:00
LICM [AssumeBundles] Remove non-determinisme from assume builder 2020-05-10 21:18:33 +02:00
LoadStoreVectorizer AMDGPU: Fix broken check lines 2020-04-01 10:52:22 -07:00
LoopDataPrefetch
LoopDeletion
LoopDistribute
LoopFusion [LoopFusion] Remove unreachable blocks from DT and LI after fusion 2020-05-07 16:44:40 -07:00
LoopIdiom Require "target datalayout" to be at the beginning of an IR file. 2020-04-20 11:55:49 -07:00
LoopInstSimplify
LoopInterchange [llvm] Fix yet more missing FileCheck colons 2020-04-13 10:49:19 -06:00
LoopLoadElim [LoopLoadElim] Fix crash by always checking simplify form 2020-04-10 09:23:28 +07:00
LoopPredication [BasicBlock] fix looping in getPostdominatingDeoptimizeCall 2020-01-17 15:40:02 +03:00
LoopReroll [LoopReroll] Fix rerolling loop with use outside the loop 2020-05-13 13:03:03 +09:00
LoopRotate [LoopRotate] Cleanup test checks to fix issue reported on D77354 2020-04-03 17:21:37 +01:00
LoopSimplify [LoopSimplify] Regenerate test checks; NFC 2020-01-11 11:02:24 +01:00
LoopSimplifyCFG
LoopStrengthReduce [LSR][ARM] Add new TTI hook to mark some LSR chains as profitable 2020-05-13 14:18:28 +01:00
LoopTransformWarning
LoopUnroll [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
LoopUnrollAndJam [LoopUnrollAndJam] Changed safety checks to consider more than 2-levels 2020-05-06 21:47:44 +00:00
LoopUnswitch
LoopVectorize Recommit #2: "[LV] Induction Variable does not remain scalar under tail-folding." 2020-05-13 13:50:09 +01:00
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerConstantIntrinsics
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [Matrix] Add option to use row-major matrix layout as default. 2020-04-06 10:00:56 +01:00
LowerSwitch
LowerTypeTests
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt [ValueTracking] Fix usage of DataLayout::getTypeStoreSize() 2020-03-20 16:52:15 -07:00
MergeFunc [MergeFuncs] Don't merge shufflevectors with different masks 2020-05-02 10:21:14 +02:00
MergeICmps Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
MetaRenamer
NameAnonGlobals
NaryReassociate
NewGVN [AssumeBundles] Remove non-determinisme from assume builder 2020-05-10 21:18:33 +02:00
ObjCARC [ObjC][ARC] Don't remove autoreleaseRV/retainRV pairs if the call isn't 2020-03-13 13:52:14 -07:00
OpenMP OpenMPOpt Remarks Support 2020-05-13 12:20:40 -05:00
PGOProfile [ICP] Handling must tail calls in indirect call promotion 2020-05-03 10:42:22 -07:00
PartiallyInlineLibCalls
PhaseOrdering [InlineFunction] Disable emission of alignment assumptions by default 2020-04-30 23:12:54 +02:00
PlaceSafepoints
PreISelIntrinsicLowering [ObjC] Override TailCallKind when lowering objc intrinsics 2019-11-11 08:30:06 -08:00
PruneEH
Reassociate [Reassociate] add testcases for more than 1 pairs - NFC 2020-03-19 05:21:24 -04:00
Reg2Mem
RewriteStatepointsForGC [RS4GC] Handle uses of extractelement for conversion from vector to scalar base 2020-03-06 16:28:49 -05:00
SCCP [BPI][NFC] Reuse post dominantor tree from analysis manager when available 2020-04-30 11:31:03 +07:00
SLPVectorizer [CostModel] Modify BasicTTI getCastInstrCost 2020-05-13 07:26:08 +01:00
SROA Make IRBuilder automatically set alignment on load/store/alloca. 2020-04-13 13:43:14 -07:00
SafeStack Require "target datalayout" to be at the beginning of an IR file. 2020-04-20 11:55:49 -07:00
SampleProfile Properly add out-of-module functions to the import list 2020-05-11 10:00:14 -07:00
ScalarizeMaskedMemIntrin/X86
Scalarizer [Scalarizer] Fix a non-deterministic scatter order problem 2020-04-20 16:05:33 +02:00
SeparateConstOffsetFromGEP Fix PR45371: SeparateConstOffsetFromGEP clean up bookkeeping 2020-04-01 12:38:15 -06:00
SimpleLoopUnswitch [SimpleLoopUnswitch] Add non-empty unreachable block check to exit cases removed. 2020-05-13 12:38:37 -07:00
SimplifyCFG Add nomerge function attribute to supress tail merge optimization in simplifyCFG 2020-05-12 16:49:20 -07:00
Sink
SpeculateAroundPHIs [NFC] Update tests 2020-05-05 15:28:40 +01:00
SpeculativeExecution
StraightLineStrengthReduce Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
StripDeadPrototypes
StripSymbols
StructurizeCFG [StructurizeCFG] Fix region nodes ordering 2020-05-13 15:33:36 +03:00
SyntheticCountsPropagation
TailCallElim
ThinLTOBitcodeWriter ThinLTOBitcodeWriter: drop dso_local when a GlobalVariable is converted to a declaration 2020-03-05 18:09:33 -08:00
TypePromotion/ARM Revert "[ARM][TypePromotion] Enable by default" 2019-12-22 11:27:11 -08:00
UnifyLoopExits Introduce unify-loop-exits pass. 2020-03-30 13:23:56 -04:00
UniqueInternalLinkageNames New pass to make internal linkage symbol names unique. 2020-04-20 15:05:22 -07:00
Util [AssumeBundles] fix crashes 2020-05-11 11:52:21 +02:00
VectorCombine/X86 [VectorCombine] add test to check for iterative improvements; NFC 2020-05-12 12:49:25 -04:00
WholeProgramDevirt [WPD] Avoid noalias assumptions in unique return value optimization 2020-04-16 14:49:51 -07:00