1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/Transforms
Jann Horn 8e1694079f [CodeGenPrepare] Eliminate llvm.expect before removing empty blocks
CodeGenPrepare currently first removes empty blocks, then in a loop
performs other optimizations. One of those optimizations is the removal
of call instructions that invoke @llvm.assume, which can create new
empty blocks.

This means that when a branch only contains a call to __builtin_assume(),
the empty branch will survive into MIR, and will then only be
half-removed by MIR-level optimizations (e.g. removing the branch but
leaving the condition intact).

Fix it by eliminating @llvm.expect builtin calls before removing empty
blocks.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D97848
2021-03-04 14:48:26 +01:00
..
ADCE [DCE] Don't remove non-willreturn calls 2021-02-19 12:35:40 +01:00
AddDiscriminators
AggressiveInstCombine [AggressiveInstCombine] Generalize foldGuardedRotateToFunnelShift to generic funnel shifts (REAPPLIED) 2020-12-21 15:22:27 +00:00
AlignmentFromAssumptions
ArgumentPromotion [ArgPromotion] Delay dead GEP removal until doPromotion. 2021-01-04 09:51:20 +00:00
AtomicExpand AMDGPU: Add support for amdgpu-unsafe-fp-atomics attribute 2021-02-04 08:09:34 -05:00
Attributor [Attributor] Make DepClass a required argument 2021-03-04 00:35:52 -06:00
BDCE [DCE] Don't remove non-willreturn calls 2021-02-19 12:35:40 +01:00
BlockExtractor
BranchFolding
CalledValuePropagation
CallSiteSplitting
CanonicalizeAliases
CanonicalizeFreezeInLoops
CodeExtractor
CodeGenPrepare [CodeGenPrepare] Eliminate llvm.expect before removing empty blocks 2021-03-04 14:48:26 +01:00
ConstantHoisting [ConstantHoisting] Fix bug where constant materialization could insert into EH pad 2021-02-01 11:23:56 -08:00
ConstantMerge
ConstraintElimination [ConstraintElimination] Use unsigned > 0 instead of != 0. 2021-02-22 17:54:36 +00:00
Coroutines [LICM][Coroutine] Don't sink stores from loops with coro.suspend instructions 2021-03-03 15:21:57 -08:00
CorrelatedValuePropagation [LVI] Handle unions of conditions 2021-01-01 16:46:21 +01:00
CrossDSOCFI
DCE [Tests] Add willreturn to libcalls in some tests 2021-01-22 21:47:35 +01:00
DeadArgElim Revert "[ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of explicitly emitting retainRV or claimRV calls in the IR" 2021-03-03 15:51:40 +01:00
DeadStoreElimination [DSE] Add support for not aligned begin/end 2021-03-04 12:24:23 +07:00
DivRemPairs
EarlyCSE [noalias.decl] Look through llvm.experimental.noalias.scope.decl 2021-01-19 20:09:42 +01:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp
FixIrreducible
Float2Int
ForcedFunctionAttrs
FunctionAttrs [FuncAttrs] Add tests for willreturn callsite inference. 2021-02-18 11:41:42 +00:00
FunctionImport
GCOVProfiling Encode alignment attribute for atomicrmw 2021-02-11 15:17:37 -05:00
GlobalDCE
GlobalMerge
GlobalOpt
GlobalSplit
GuardWidening
GVN [GVN] do not repeat PRE on failure to split critical edge 2021-01-25 11:23:44 -08:00
GVNHoist [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01:00
GVNSink [AssumptionCache] Do not track llvm.assume calls (PR49043) 2021-02-06 12:18:30 -06:00
HardwareLoops [ARM] Update and add extra WLS testing. NFC 2021-03-01 21:46:09 +00:00
HelloNew
HotColdSplit
IndirectBrExpand
IndVarSimplify [IndVars] Add test cases inspired by PR48965. 2021-02-25 15:54:18 +00:00
InferAddressSpaces [NewPM] Port infer-address-spaces 2020-12-28 19:58:12 -08:00
InferFunctionAttrs [BuildLibCalls] Add noundef to allocator fns' size 2021-02-23 13:58:03 +09:00
Inline Revert "[ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of explicitly emitting retainRV or claimRV calls in the IR" 2021-03-03 15:51:40 +01:00
InstCombine [InstCombine] Move statepoint intrinsic handling from visitCall to visitCallBase 2021-03-04 11:00:22 +07:00
InstMerge
InstNamer
InstSimplify Revert rGd65ddca83ff85c7345fe9a0f5a15750f01e38420 - "[ValueTracking] ComputeKnownBits - minimum leading/trailing zero bits in LSHR/SHL (PR44526)" 2021-02-24 18:03:17 +00:00
InterleavedAccess [CodeGen] Update transformations to use poison for shufflevector/insertelem's initial vector elem 2021-01-10 18:03:51 +09:00
Internalize
IRCE
IROutliner [IROutliner] Adapting to hoisted bitcasts in CodeExtractor 2021-01-13 11:10:37 -06:00
JumpThreading [JumpThreading] Clone noalias.scope.decl when threading blocks 2021-02-22 18:35:30 +01:00
LCSSA
LICM [LICM][Coroutine] Don't sink stores from loops with coro.suspend instructions 2021-03-03 15:21:57 -08:00
LoadStoreVectorizer Precommit transform tests that have poison as insertelement's placeholder 2020-12-24 11:46:17 +09:00
LoopDataPrefetch
LoopDeletion [LoopDeletion] Handle inner loops w/untaken backedges 2021-01-22 16:31:29 -08:00
LoopDistribute [LoopDistribute] Add tests with uncomputable BTCs. 2021-01-01 13:57:03 +00:00
LoopFlatten
LoopFusion
LoopIdiom [Tests] Added test for memcpy loop idiom recognization 2021-01-13 14:55:46 +01:00
LoopInstSimplify
LoopInterchange [NFC] Refactor LoopInterchange into a loop-nest pass 2021-02-18 00:55:38 +08:00
LoopLoadElim [LoopLoadElim] Pass ScalarEvolution in old pass manager. PR49141 2021-02-15 18:08:23 +07:00
LoopPredication
LoopReroll
LoopRotate [LoopRotate] Use llvm.experimental.noalias.scope.decl for duplicating noalias metadata as needed 2021-01-24 13:53:13 +01:00
LoopSimplify Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
LoopSimplifyCFG
LoopStrengthReduce [LSR] Unify scheduling of existing and inserted addrecs 2021-03-03 12:07:55 -08:00
LoopTransformWarning
LoopUnroll Reland "[Libcalls, Attrs] Annotate libcalls with noundef" 2021-02-20 06:18:48 +01:00
LoopUnrollAndJam LoopUnrollAndJam] Only allow loops with single exit(ing) blocks 2021-02-05 16:10:53 +00:00
LoopUnswitch [LoopUnswitch] Add shortcut if unswitched path is a no-op. 2021-02-01 09:03:30 +00:00
LoopVectorize [LV] Add test cases that require a larger number of RT checks. 2021-03-02 10:49:38 +00:00
LoopVersioning
LoopVersioningLICM [NewPM][opt] Run the "default" AA pipeline by default 2021-01-21 21:08:54 -08:00
LowerAtomic
LowerConstantIntrinsics
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics Reland "[Libcalls, Attrs] Annotate libcalls with noundef" 2021-02-20 06:18:48 +01:00
LowerSwitch
LowerTypeTests [LTT] Don't attempt to lower type tests used only by assumes 2021-02-06 09:02:10 -08:00
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt [MemCpyOpt] Fix handling of readnone byval arguments 2021-02-22 18:48:31 +01:00
MergeFunc
MergeICmps
MetaRenamer
NameAnonGlobals
NaryReassociate Revert "[NARY-REASSOCIATE] Support reassociation of min/max" 2021-02-26 19:47:54 +07:00
NewGVN [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
ObjCARC Revert "[ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of explicitly emitting retainRV or claimRV calls in the IR" 2021-03-03 15:51:40 +01:00
OpenMP [Attributor] Conditinoally delete fns 2021-02-27 20:37:42 -05:00
PartialInlining
PartiallyInlineLibCalls
PGOProfile [test] Fix PGOProfile/comdat_internal.ll 2021-02-26 16:27:23 -08:00
PhaseOrdering [SCEV] Use both known bits and sign bits when computing range of SCEV unknowns 2021-02-19 08:29:12 -08:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH [FuncAttrs] Infer noreturn 2021-01-05 13:25:42 -08:00
Reassociate [Reassociate] allow or->add with shl operands 2021-02-07 09:45:19 -05:00
Reg2Mem
RewriteStatepointsForGC [IR] Let IRBuilder's CreateVectorSplat/CreateShuffleVector use poison as placeholder 2020-12-30 04:21:04 +09:00
SafeStack
SampleProfile [CSSPGO] Deduplicating dangling pseudo probes. 2021-03-03 22:44:42 -08:00
ScalarizeMaskedMemIntrin Expand masked mem intrinsics correctly wrt big-endian 2021-02-11 08:59:52 +00:00
Scalarizer [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
SCCP Revert "[ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of explicitly emitting retainRV or claimRV calls in the IR" 2021-03-03 15:51:40 +01:00
SeparateConstOffsetFromGEP
SimpleLoopUnswitch [SimpleLoopUnswitch] Don't non-trivially unswitch loops that are unsafe to clone 2021-02-08 13:19:24 -08:00
SimplifyCFG [SimplifyCFG] avoid illegal phi with both poison and undef 2021-02-27 09:10:32 -05:00
Sink
SLPVectorizer [SLP]Merge reorder and reuse shuffles. 2021-03-02 06:39:47 -08:00
SpeculateAroundPHIs
SpeculativeExecution Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
SROA [SROA] Amend failing test from D95826 2021-02-17 13:58:34 -05:00
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols
StructurizeCFG [test] Pin backedge-id-bug-xfail.ll to legacy PM 2021-01-04 13:09:42 -08:00
SyntheticCountsPropagation
TailCallElim Revert "[ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of explicitly emitting retainRV or claimRV calls in the IR" 2021-03-03 15:51:40 +01:00
ThinLTOBitcodeWriter Transforms: Clone distinct nodes in metadata mapper unless RF_ReuseAndMutateDistinctMDs 2021-02-24 12:57:52 -08:00
TypePromotion/ARM
UnifyFunctionExitNodes
UnifyLoopExits
UniqueInternalLinkageNames Add sample-profile-suffix-elision-policy attribute with -funique-internal-linkage-names. 2021-01-12 15:15:53 -08:00
Util [Remarks] Provide more information about auto-init calls 2021-02-25 15:14:09 -08:00
VectorCombine Revert "[ConstantFold] Fold more operations to poison" 2021-02-04 00:24:02 +09:00
WholeProgramDevirt [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00