1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/Transforms
Joseph Tremoulet 00f16af21d [Mem2Reg] Fix nondeterministic corner case
Summary:
When mem2reg inserts phi nodes in blocks with unreachable predecessors,
it adds undef operands for those incoming edges.  When there are
multiple such predecessors, the order is currently based on the address
of the BasicBlocks.  This change fixes that by using the BBNumbers in
the sort/search predicates, as is done elsewhere in mem2reg to ensure
determinism.

Also adds a testcase with a bunch of unreachable preds, which
(nodeterministically) fails without the fix.


Reviewers: majnemer

Reviewed By: majnemer

Subscribers: mgrang, llvm-commits

Differential Revision: https://reviews.llvm.org/D55077

llvm-svn: 348024
2018-11-30 19:20:02 +00:00
..
ADCE
AddDiscriminators
AggressiveInstCombine
AlignmentFromAssumptions
ArgumentPromotion
AtomicExpand
BDCE
BlockExtractor [hot-cold-split] Name split functions with ".cold" suffix 2018-10-24 18:53:47 +00:00
BranchFolding
CalledValuePropagation
CallSiteSplitting [CallSiteSplitting] Report edge deletion to DomTreeUpdater 2018-11-29 15:27:04 +00:00
CodeExtractor [PartialInliner] Make PHIs free in cost computation. 2018-11-27 18:17:27 +00:00
CodeGenPrepare Fix a use-after-RAUW bug in large GEP splitting 2018-10-19 19:02:16 +00:00
ConstantHoisting X86/TargetTransformInfo: Report div/rem constant immediate costs as TCC_Free 2018-10-11 23:14:35 +00:00
ConstantMerge
ConstProp Disable calls to *_finite and other glibc-only functions on Musl. 2018-11-06 18:23:32 +00:00
Coroutines
CorrelatedValuePropagation [CVP] auto-generate complete test checks; NFC 2018-11-29 14:28:47 +00:00
CrossDSOCFI
DCE
DeadArgElim
DeadStoreElimination
DivRemPairs
EarlyCSE
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp/X86
Float2Int
ForcedFunctionAttrs
FunctionAttrs
FunctionImport [ThinLTO] Update handling of vararg functions to match inliner 2018-11-14 19:30:13 +00:00
GCOVProfiling [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
GlobalDCE GlobalDCE: Teach isEmptyFunction() to ignore debug intrinsics. 2018-11-16 17:47:21 +00:00
GlobalMerge
GlobalOpt [DebugInfo][GlobalOpt] Fix -debugify for globalopt shrinking globals to booleans. 2018-10-23 16:35:51 +00:00
GlobalSplit
GuardWidening
GVN [Local] Keep K's range if K does not move when combining metadata. 2018-10-27 16:53:45 +00:00
GVNHoist
GVNSink
HotColdSplit [CodeExtractor] Mark functions noreturn when applicable 2018-11-08 17:57:09 +00:00
IndirectBrExpand
IndVarSimplify Return "[IndVars] Smart hard uses detection" 2018-11-08 11:54:35 +00:00
InferAddressSpaces
InferFunctionAttrs Disable calls to *_finite and other glibc-only functions on Musl. 2018-11-06 18:23:32 +00:00
Inline [Inliner] Modify the merging of min-legal-vector-width attribute to better handle when the caller or callee don't have the attribute. 2018-11-29 07:27:38 +00:00
InstCombine Revert r347871 "Fix: Add support for TFE/LWE in image intrinsic" 2018-11-29 20:14:17 +00:00
InstMerge [DebugInfo][InstMerge] Fix -debugify for phi node created by -mldst-motion 2018-11-02 18:25:41 +00:00
InstNamer
InstSimplify [InstSimplify] fold select with implied condition 2018-11-29 18:44:39 +00:00
InterleavedAccess
Internalize
IPConstantProp
IRCE
JumpThreading [JumpThreading] Fix exponential time algorithm computing known values. 2018-11-09 22:35:26 +00:00
LCSSA [DebugInfo][LCSSA] Rewrite pre-existing debug values outside loop 2018-10-16 08:06:48 +00:00
LICM [LICM] Reapply r347776 "Make LICM able to hoist phis" with fix 2018-11-29 17:10:00 +00:00
LoadStoreVectorizer
LoopDataPrefetch
LoopDeletion
LoopDistribute
LoopIdiom
LoopInstSimplify
LoopInterchange [LoopInterchange] Support reductions across inner and outer loop. 2018-11-08 20:44:19 +00:00
LoopLoadElim
LoopPredication
LoopReroll
LoopRotate Update MemorySSA in LoopRotate. 2018-10-24 22:46:45 +00:00
LoopSimplify Revert r346810 "Preserve loop metadata when splitting exit blocks" 2018-11-14 01:47:32 +00:00
LoopSimplifyCFG [LoopSimplifyCFG] Update MemorySSA in terminator folding. PR39783 2018-11-30 10:06:23 +00:00
LoopStrengthReduce [LoopStrengthReduce] ComplexityLimit as an option 2018-11-29 08:34:22 +00:00
LoopUnroll [LoopUnroll] allow customization for new-pass-manager version of LoopUnroll 2018-10-31 14:33:14 +00:00
LoopUnrollAndJam
LoopUnswitch
LoopVectorize Add a new reduction pattern match 2018-11-30 13:40:10 +00:00
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerSwitch
LowerTypeTests
Mem2Reg [Mem2Reg] Fix nondeterministic corner case 2018-11-30 19:20:02 +00:00
MemCpyOpt
MergeFunc [MergeFuncs] Generate alias instead of thunk if possible 2018-11-21 19:37:19 +00:00
MergeICmps [MergeICmps] Do not perform the transformation if GEP is used outside of block 2018-11-05 18:16:32 +00:00
MetaRenamer
NameAnonGlobals
NaryReassociate
NewGVN [NewGVN] Make sure we do not add a user to itself. 2018-11-07 17:20:07 +00:00
ObjCARC
PartiallyInlineLibCalls
PGOProfile [PGO] Exit early if all count values are zero 2018-11-07 23:51:20 +00:00
PhaseOrdering
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate [PatternMatch] Handle undef vectors consistently 2018-11-20 16:08:19 +00:00
Reg2Mem
RewriteStatepointsForGC
SafeStack
SampleProfile
ScalarizeMaskedMemIntrin/X86
Scalarizer [PM] Port Scalarizer to the new pass manager. 2018-11-21 14:00:17 +00:00
SCCP [IPSCCP] Use input operand instead of OriginalOp for ssa_copy. 2018-11-25 16:32:02 +00:00
SeparateConstOffsetFromGEP
SimpleLoopUnswitch [SimpleLoopUnswitch] adding cost multiplier to cap exponential unswitch with 2018-11-16 21:16:43 +00:00
SimplifyCFG [SimplifyCFG] auto-generate complete checks; NFC 2018-11-29 16:28:37 +00:00
Sink
SLPVectorizer [SLP]PR39774: Update references of the replaced external instructions. 2018-11-30 15:14:20 +00:00
SpeculateAroundPHIs
SpeculativeExecution
SROA [SROA] Use offset sizes from the DataLayout instead of the pointer siezes. 2018-10-30 11:15:04 +00:00
StraightLineStrengthReduce [SLSR] use 'match' to simplify code; NFC 2018-10-23 14:07:39 +00:00
StripDeadPrototypes
StripSymbols
StructurizeCFG StructurizeCFG: Simplify inserted PHI nodes 2018-10-17 15:37:41 +00:00
SyntheticCountsPropagation
TailCallElim
ThinLTOBitcodeWriter
Util [ICP] Remove incompatible attributes at indirect-call promoted callsites. 2018-11-26 22:03:52 +00:00
WholeProgramDevirt