1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/test/Transforms
Nikita Popov ea8b19209c [LICM] Remove MaybePromotable set (PR50367)
The MaybePromotable set keeps track of loads/stores for which
promotion was not attempted yet. Normally, any load/stores that
are promoted in the current iteration will be removed from this
set, because they naturally MustAlias with the promoted value.
However, if the source program has UB with metadata claiming that
a store is NoAlias, while it is actually MustAlias, and multiple
different pointers are promoted in the same iteration, it can
happen that a store is removed that is still in the MaybePromotable
set, causing a use-after-free.

While this could be fixed by explicitly invalidating values in
MaybePromotable in the LoopPromoter, I'm going with the more
radical option of dropping the set entirely here and check all
load/stores on each promotion iteration. As promotion, and especially
repeated promotion, are quite rare, this doesn't seem to have any
impact on compile-time.

Fixes https://bugs.llvm.org/show_bug.cgi?id=50367.
2021-05-18 20:26:01 +02: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 [AssumeBundles] offset should be added to correctly calculate align 2021-04-02 12:32:05 +09:00
ArgumentPromotion [ArgumentPromotion] Fix byval alignment handling. 2021-05-11 11:22:18 -07:00
AtomicExpand Revert "[CodeGen][ARM] Implement atomicrmw as pseudo operations at -O0" 2021-05-03 21:48:20 +01:00
Attributor [Attributor] Call site specific AAValueSimplification and AAIsDead. 2021-05-15 21:39:07 +00:00
BDCE [DCE] Don't remove non-willreturn calls 2021-02-19 12:35:40 +01:00
BlockExtractor [BlockExtract][NewPM] Port -extract-blocks to NPM 2020-10-21 12:51:11 -07:00
BranchFolding
CalledValuePropagation
CallSiteSplitting [SimplifyCFG] Teach simplifyUnreachable() to preserve DomTree 2020-12-18 00:37:22 +03:00
CanonicalizeAliases [NPM] Move more O0 pass building into PassBuilder 2020-11-19 11:22:23 -08:00
CanonicalizeFreezeInLoops
CodeExtractor [HotColdSplit] Reflect full cost of parameters in split penalty 2020-12-18 17:06:17 -08:00
CodeGenPrepare [CPG][ARM] Optimize towards branch on zero in codegenprepare 2021-05-16 17:54:06 +01:00
ConstantHoisting [ConstantHoisting] Fix bug where constant materialization could insert into EH pad 2021-02-01 11:23:56 -08:00
ConstantMerge [ConstantMerge] Don't merge thread_local constants with non-thread_local constants 2021-04-28 23:44:20 +01:00
ConstraintElimination [ConstraintElimination] Only strip casts preserving the representation. 2021-03-26 20:07:41 +00:00
Coroutines [Coroutines] Salvege Debug.values 2021-05-13 13:06:33 +08:00
CorrelatedValuePropagation [LVI] Handle mask not equal zero conditions 2021-05-01 23:08:49 +02:00
CrossDSOCFI
DCE [Tests] Add willreturn to libcalls in some tests 2021-01-22 21:47:35 +01:00
DeadArgElim Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
DeadStoreElimination [DSE] Move isOverwrite into DSEState. NFC 2021-05-14 09:16:51 +01:00
DivRemPairs
EarlyCSE [gvn] CSE gc.relocates based on meaning, not spelling (try 2) 2021-03-16 10:59:31 -07:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp
FixIrreducible
Float2Int
ForcedFunctionAttrs
FunctionAttrs [tests] Update Transforms/FunctionAttrs/nosync.ll 2021-05-06 01:39:18 +02:00
FunctionImport [CGProfile] allows bitcast in metadata node storing function pointers 2020-11-13 09:28:21 -08:00
GCOVProfiling [gcov] Set nounwind and respect module flags metadata "frame-pointer" & "uwtable" for synthesized functions 2021-04-26 13:30:21 -07:00
GlobalDCE [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
GlobalMerge
GlobalOpt [GlobalOpt] add tests for store alignment (PR50253); NFC 2021-05-15 07:31:45 -04:00
GlobalSplit [test] Fix mix of variable use/def and regex match 2021-03-24 17:58:16 +00:00
GuardWidening
GVN [GVN] Improve analysis for missed optimization remark 2021-05-17 21:51:15 -07:00
GVNHoist Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
GVNSink [GVNSink] auto-generate test checks; NFC 2021-04-02 13:16:35 -04:00
HardwareLoops [test, HardwareLoops] Fix use of var defined in CHECK-NOT 2021-03-30 15:06:32 +01:00
HelloNew
HotColdSplit [HotColdSplit] Reflect full cost of parameters in split penalty 2020-12-18 17:06:17 -08:00
IndirectBrExpand
IndVarSimplify [SCEV] By more careful when traversing phis in isImpliedViaMerge. 2021-05-07 19:52:29 +01:00
InferAddressSpaces [NewPM] Port infer-address-spaces 2020-12-28 19:58:12 -08:00
InferFunctionAttrs [BuildLibCalls] Remove inaccessiblememonly inference for calloc 2021-04-29 00:17:37 +02:00
Inline [Inliner] Copy attributes when deoptimize intrinsic is inlined 2021-05-18 10:08:37 +07:00
InstCombine [InstCombine] restrict funnel shift match to avoid miscompile 2021-05-18 13:32:07 -04:00
InstMerge OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
InstNamer Port -instnamer to NPM 2020-10-22 12:08:36 -07:00
InstSimplify [InstSimplify] Remove redundant {insert,extract}_vector intrinsic chains 2021-05-13 16:09:50 +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 [SCEV] By more careful when traversing phis in isImpliedViaMerge. 2021-05-07 19:52:29 +01:00
IROutliner [IROutliner] Adapting to hoisted bitcasts in CodeExtractor 2021-01-13 11:10:37 -06:00
JumpThreading [LazyValueInfo] Insert an Overdefined placeholder to prevent infinite recursion 2021-05-07 16:05:50 +08:00
LCSSA [DebugInfo] Avoid re-ordering assignments in LCSSA 2020-12-17 16:17:32 +00:00
LICM [LICM] Remove MaybePromotable set (PR50367) 2021-05-18 20:26:01 +02:00
LoadStoreVectorizer Change the context instruction for computeKnownBits in LoadStoreVectorizer pass 2021-05-12 15:29:29 -07:00
LoopDataPrefetch
LoopDeletion [Test] Auto-generate checks in a test (prepring to update) 2021-05-17 18:26:47 +07:00
LoopDistribute [SCEVExpander] ReuseOrCreateCast(): use IRBuilder to actually create the cast 2021-04-19 18:38:39 +03:00
LoopFlatten [LoopFlatten] Simplify loops so that the pass can operate on unsimplified loops. 2021-05-12 19:22:01 +01:00
LoopFusion [llvm] Unbreak no-asserts testing after 18839be9c5c8b9f882dd241769784035b082d4e1 2021-04-27 05:46:43 -04:00
LoopIdiom [LoopIdiom] 'logical right-shift until zero' ('count active bits') "on steroids" idiom recognition. 2021-05-17 20:33:33 +03:00
LoopInstSimplify
LoopInterchange [LoopInterchange] Handle lcssa PHIs with multiple predecessors 2021-05-11 21:30:54 -04:00
LoopLoadElim [IndVars] Provide eliminateIVComparison with context 2021-03-19 12:28:22 +07:00
LoopPredication [NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions 2021-03-06 21:52:46 +03:00
LoopReroll [LoopReroll] Fix rerolling loop with extra instructions 2021-04-23 15:14:46 +09:00
LoopRotate [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose 2021-05-07 21:51:47 -07:00
LoopSimplify [InstCombine] Fully disable select to and/or i1 folding 2021-05-06 09:29:52 +09:00
LoopSimplifyCFG
LoopStrengthReduce [LSR][DebugInfo] Don't unnecessarily drop DebugLocs 2021-04-26 13:14:42 +01:00
LoopTransformWarning
LoopUnroll Do actual DCE in LoopUnroll (try 3) 2021-05-17 14:47:02 -07:00
LoopUnrollAndJam Do actual DCE in LoopUnroll (try 3) 2021-05-17 14:47:02 -07:00
LoopUnswitch Explicitly enable the new pass manager in this test. 2021-03-25 18:10:36 -07:00
LoopVectorize [LV] Add test which sinks a load a across an aliasing store. 2021-05-18 12:25:57 +01:00
LoopVersioning Revert "[BasicAA] Handle two unknown sizes for GEPs" 2020-12-18 17:59:12 +00:00
LoopVersioningLICM [NewPM][opt] Run the "default" AA pipeline by default 2021-01-21 21:08:54 -08:00
LowerAtomic
LowerConstantIntrinsics [LowerConstantIntrinsics] reuse isManifestLogic from ConstantFolding 2021-05-14 15:35:21 -07:00
LowerExpectIntrinsic Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 2020-11-14 13:12:38 +03:00
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [Matrix] Fold the transpose into the matmul operand used to fetch scalars 2021-05-17 17:40:46 -07: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 Reapply [CaptureTracking] Do not check domination 2021-05-16 15:46:31 +02:00
MergeFunc OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
MergeICmps Tweak a test so it actually gets autogened 2021-03-22 11:32:32 -07:00
MetaRenamer OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
NameAnonGlobals [NPM] Move more O0 pass building into PassBuilder 2020-11-19 11:22:23 -08:00
NaryReassociate [NARY] Don't optimize min/max if there are side uses (part2) 2021-04-30 19:02:02 +07:00
NewGVN [NewGVN] Use ExprResult to add extra predicate users. 2021-04-25 11:13:32 +01:00
ObjCARC [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
OpenMP [llvm] Unbreak no-assertion testing 2021-05-04 06:05:38 -04:00
PartialInlining [PartialInliner]: Handle code regions in a switch stmt cases 2020-11-02 14:32:45 -05:00
PartiallyInlineLibCalls
PGOProfile [InstCombine] Fully disable select to and/or i1 folding 2021-05-06 09:29:52 +09:00
PhaseOrdering [PhaseOrdering] Add test for insert/extract code for matrixes. 2021-05-16 12:52:20 +01:00
PlaceSafepoints [PlaceSafepoints] Pin tests to legacy PM 2020-10-26 20:07:37 -07:00
PreISelIntrinsicLowering
PruneEH [FuncAttrs] Infer noreturn 2021-01-05 13:25:42 -08:00
Reassociate Revert "Re-reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands"" 2021-04-30 20:23:21 -07:00
Reg2Mem [Reg2Mem] add support for the new pass manager 2020-11-08 11:14:05 +00:00
RelLookupTableConverter/X86 [Passes] Add relative lookup table converter pass 2021-04-13 01:29:41 +00:00
RewriteStatepointsForGC [rs4gc] Strip memory related attributes consistently 2021-05-14 07:54:56 -07:00
SafeStack OpaquePtr: Bulk update tests to use typed byval 2020-11-20 14:00:46 -05:00
SampleProfile [CSSPGO] Update pseudo probe distribution factor based on inline context. 2021-05-16 23:11:36 -07: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 [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose 2021-05-07 21:51:47 -07:00
SeparateConstOffsetFromGEP [test] Make global in split-gep-and-gvn.ll not constant 2021-04-19 11:03:19 -07:00
SimpleLoopUnswitch Revert "[SimpleLoopUnswitch] Port partially invariant unswitch from LoopUnswitch to SimpleLoopUnswitch" 2021-05-13 08:40:49 +01:00
SimplifyCFG [SimplifyCFG] Ignore ephemeral values when counting insts for threading 2021-05-09 19:06:54 -07:00
Sink
SLPVectorizer [SLP][NFC]Add a test for non-consecutive inserts, NFC. 2021-05-14 12:44:35 -07:00
SpeculateAroundPHIs
SpeculativeExecution Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
SROA Reapply [ConstantFold] Fold more operations to poison 2021-05-13 16:04:12 +02:00
StraightLineStrengthReduce [NPM] Add remaining test of -slsr 2020-11-17 14:41:01 +08:00
StripDeadPrototypes
StripSymbols [DebugInfo] Support for signed constants inside DIExpression 2021-03-30 23:20:38 +05:30
StructurizeCFG [test] Pin backedge-id-bug-xfail.ll to legacy PM 2021-01-04 13:09:42 -08:00
SyntheticCountsPropagation
TailCallElim Autogen some tests for ease of update 2021-03-22 11:06:29 -07:00
ThinLTOBitcodeWriter [ThinLTO] Copy UnnamedAddr when spliting module. 2021-04-19 14:04:58 -07:00
TypePromotion/ARM
UnifyFunctionExitNodes [NPM] Port -mergereturn to NPM 2020-10-20 10:33:58 -07:00
UnifyLoopExits [NPM] port -unify-loop-exits to NPM 2020-10-20 10:46:57 -07:00
Util [AnnotationRemarks] Use subprogram location for summary remarks. 2021-03-23 12:05:41 +00:00
VectorCombine [VectorCombine] Add tests with and & urem guaranteeing idx is valid. 2021-05-16 12:51:53 +01:00
WholeProgramDevirt Don't use $ as suffix for symbol names in ThinLTOBitcodeWriter and other places 2021-03-29 13:03:52 +02:00