llvm-project/llvm/test/Transforms
Congzhe Cao 75b33d6bd5 [LoopInterchange] Check phis in all subloops
This is the bugfix to the miscompile mentioned in
https://reviews.llvm.org/D132055#3814831. The IR
that reproduced the bug is added as the test case in
this patch.

What this patch does is that, during legality phase
instead of checking the phi nodes only in `InnerLoop`
and `OuterLoop`, we check phi nodes in all subloops
of the `OuterLoop`. Suppose if the loop nest is triply
nested, and `InnerLoop` and `OuterLoop` is the middle
loop and the outermost loop respectively, we'll check
phi nodes in the innermost loop as well, in addition to
the ones in the middle and outermost loops.

Reviewed By: Meinersbur, #loopoptwg

Differential Revision: https://reviews.llvm.org/D134930
2022-11-04 00:20:52 -04:00
..
ADCE [ADCE] Update tests to use opaque pointers (NFC) 2022-06-22 12:26:12 +02:00
AddDiscriminators [AddDiscriminators] Migrate tests to opaque pointers (NFC) 2022-06-22 12:47:12 +02:00
AggressiveInstCombine [AggressiveInstCombine] Avoid load merge/widen if stores are present b/w loads 2022-11-03 14:32:07 +00:00
AlignmentFromAssumptions [AlignmentFromAssumptions] Migrate tests to opaque pointers (NFC) 2022-06-22 13:57:47 +02:00
ArgumentPromotion [ArgPromotion] Transfer metadata nontemporal to promoted loads 2022-07-26 16:30:08 +08:00
AtomicExpand AtomicExpand: Use InstSimplifyFolder 2022-10-31 23:31:42 -07:00
Attributor Revert "[AAPointerInfo] refactor how offsets and Access objects are tracked" 2022-11-03 00:01:51 -05:00
BDCE
BlockExtractor [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
BranchFolding
CallSiteSplitting [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
CalledValuePropagation
CanonicalizeAliases [LegacyPM] Remove LTO passes from optimization pipeline 2022-07-17 14:24:36 -07:00
CanonicalizeFreezeInLoops
CodeExtractor [opt] Remove temporary legacy pass name translations 2022-10-07 11:09:46 -07:00
CodeGenPrepare [SimplifyLibCalls] Retain attributes added by Builder.CreateMem* 2022-10-04 13:11:34 +00:00
ConstantHoisting [test] Update some legacy PM tests 2022-09-30 11:31:02 -07:00
ConstantMerge
ConstraintElimination [ConstraintElim] Drop bail out for scalable vectors after using getTrue 2022-11-03 19:05:45 +00:00
Coroutines [Coroutines] Don't merge readnone calls in presplit coroutines 2022-10-17 10:22:43 +08:00
CorrelatedValuePropagation [CVP] Simplify comparisons without constant operand 2022-11-03 15:35:27 +01:00
CrossDSOCFI
DCE [DCE] Update tests to use opaque pointers (NFC) 2022-06-10 17:31:35 +02:00
DFAJumpThreading [NFC] Switch a few uses of undef to poison as placeholders for unreachble code 2022-07-03 14:34:03 +01:00
DeadArgElim [Globals] Treat nobuiltin fns as maybe-derefined. 2022-08-23 13:45:10 +01:00
DeadStoreElimination [test] Use -passes in more Transforms tests 2022-10-21 17:02:02 +02:00
DivRemPairs [Mips] Implement hasDivRemOp() 2022-05-16 14:45:40 +08:00
EarlyCSE [opt] Remove temporary legacy pass name translations 2022-10-07 11:09:46 -07:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp [test][ExpandMemCmp] Convert test cases to opaque pointers. NFC 2022-10-07 15:29:32 +02:00
FixIrreducible [BasicBlockUtils] Add a new way for CreateControlFlowHub() 2022-10-31 08:58:54 -05:00
Float2Int
ForcedFunctionAttrs
FunctionAttrs [IR] Take operand bundles into account for call argument readonly/writeonly 2022-11-01 09:30:03 +01:00
FunctionImport [test] Change -function-import tests to use -passes= 2022-07-17 21:43:00 -07:00
FunctionSpecialization [FuncSpec] Do not overestimate the specialization bonus for users inside loops. 2022-10-27 15:26:11 +01:00
GCOVProfiling [InstrProf] Add the skipprofile attribute 2022-08-04 08:45:27 -07:00
GVN [GVN] Regenerate test checks (NFC) 2022-10-28 17:29:29 +02:00
GVNHoist [opt] Remove temporary legacy pass name translations 2022-10-07 11:09:46 -07:00
GVNSink Revert "[SimplifyCFG] Thread branches on same condition in more cases (PR54980)" 2022-07-05 16:57:46 +02:00
GlobalDCE
GlobalMerge Fix the eh-filter.ll test. 2022-06-29 16:14:41 -05:00
GlobalOpt [GlobalOpt] Don't remove inalloca from varargs functions 2022-11-01 13:04:05 -07:00
GlobalSplit
GuardWidening [GuardWidening] Add tests showing incorrect behavior of GW. 2022-06-29 13:41:59 +07:00
HardwareLoops
HelloNew
HotColdSplit [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
IRCE [IRCE] Bail in case of pointer types. PR40539 2022-09-12 16:01:25 +07:00
IROutliner [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
IndVarSimplify [SCEVExpander] Forget SCEV when replacing congruent phi. 2022-11-01 17:49:38 +00:00
IndirectBrExpand
InferAddressSpaces [DebugInfo][InferAddressSpaces] Propagate DebugLoc when cloning an instruction in InferAddressSpaces 2022-09-29 08:43:37 +00:00
InferFunctionAttrs [InstCombine] Tighten up known library function signature tests (PR #56463) 2022-08-10 14:15:46 -06:00
Inline [NFC][3/n] Remove enable-new-pm from Inline tests 2022-10-10 13:42:42 -07:00
InstCombine [InstCombine] Perform memset -> load forwarding 2022-11-03 16:03:57 +01:00
InstMerge [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
InstNamer
InstSimplify [instsimplify] Move (extelt (inselt Vec, Value, Index), Index) -> Value from InstCombine 2022-10-17 15:22:06 -07:00
InterleavedAccess [IR] Move vector.insert/vector.extract out of experimental namespace 2022-06-27 10:48:45 +00:00
Internalize [Internalize] Support glob patterns for API lists 2022-07-22 08:24:32 -04:00
JumpThreading [NFC][2/n] Remove PrunePH pass 2022-09-26 18:38:04 -07:00
LCSSA [LCSSA] Update unreachable uses with poison. 2022-09-04 22:26:18 +01:00
LICM [MustExec][LICM] Handle latch being part of an inner cycle (PR57780) 2022-10-11 09:30:13 +02:00
LoadStoreVectorizer [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
LoopBoundSplit
LoopDataPrefetch [LoopDataPrefetch] Fix crash when TTI doesn't set CacheLineSize 2022-07-26 13:08:42 +08:00
LoopDeletion [Loop] Move block and loop dispo invalidation to makeLoopInvariant. 2022-10-14 21:58:14 +01:00
LoopDistribute [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
LoopFlatten [Test] Regenerate tests using update_tests.py 2022-08-19 14:51:19 +07:00
LoopFusion [LoopFuse] Ensure loops are in loop simplified form under new PM 2022-10-31 11:46:28 -04:00
LoopIdiom [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
LoopInstSimplify
LoopInterchange [LoopInterchange] Check phis in all subloops 2022-11-04 00:20:52 -04:00
LoopLoadElim [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
LoopPredication [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
LoopReroll [test] Use -passes in more Transforms tests 2022-10-21 17:02:02 +02:00
LoopRotate [LoopRotate] Drop loop dispositions when rotating loops. PR56260 2022-09-19 18:01:02 +07:00
LoopSimplify [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
LoopSimplifyCFG [LoopSimplifyCFG] Forget loop and block dispos after merging blocks. 2022-10-20 11:23:29 +01:00
LoopStrengthReduce [LSR] Drop LSR solution if it is less profitable than baseline 2022-10-27 10:13:57 -07:00
LoopTransformWarning [test] Use new pass manager syntax in some tests 2022-10-23 13:44:20 -07:00
LoopUnroll [LoopPeeling] Add flag to disable support for peeling loops with non-latch exits 2022-10-25 12:19:14 -07:00
LoopUnrollAndJam [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
LoopVectorize [LoopVectorize] Fix crash on "Cannot dereference end iterator!"(PR56627) 2022-11-03 23:13:37 +08:00
LoopVersioning [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
LoopVersioningLICM [NFC][1/n] Remove -enable-new-pm=0 flags from lit tests 2022-09-19 09:57:37 -07:00
LowerAtomic [NFC] Switch a few uses of undef to poison as placeholders for unreachable code 2022-07-23 21:50:11 +01:00
LowerConstantIntrinsics tests: add attributes that would normally come from inferattrs 2022-07-25 17:29:00 -04:00
LowerExpectIntrinsic
LowerGlobalDestructors
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [opt] Remove temporary legacy pass name translations 2022-10-07 11:09:46 -07:00
LowerSwitch
LowerTypeTests [test] Change -lowertypetests tests to -passes= 2022-07-17 15:03:46 -07:00
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg [test] Use -passes in more Transforms tests 2022-10-21 17:02:02 +02:00
MemCpyOpt [test] Use -passes in more Transforms tests 2022-10-21 17:02:02 +02:00
MergeFunc [llvm] Handle dso_local_equivalent in FunctionComparator 2022-09-22 18:42:31 +00:00
MergeICmps
MetaRenamer
NameAnonGlobals [LegacyPM] Remove LTO passes from optimization pipeline 2022-07-17 14:24:36 -07:00
NaryReassociate
NewGVN [opt] Don't translate legacy -analysis flag to require<analysis> 2022-10-07 14:54:34 -07:00
ObjCARC [ObjCARC] Regenerate test checks (NFC) 2022-10-31 14:55:05 +01:00
OpenMP [OpenMP][FIX] Do not add custom state machine eagerly in LTO runs 2022-10-26 10:40:11 -07:00
PGOProfile [PGO] Add a threshold for number of critical edges in PGO 2022-11-02 10:14:04 -07:00
PartialInlining
PartiallyInlineLibCalls
PhaseOrdering [InstCombine] canonicalize branch with logical-and-not condition 2022-10-31 15:51:45 -04:00
PlaceSafepoints Revert "Remove PlaceSafepoints pass" 2022-10-13 07:17:25 -07:00
PreISelIntrinsicLowering
Reassociate [test] Use -passes in more Transforms tests 2022-10-21 17:02:02 +02:00
Reg2Mem
RelLookupTableConverter/X86 [RelLookupTableConverter] Bail on invalid pointer size (x32) 2022-08-09 09:36:39 +02:00
RewriteStatepointsForGC [X86] Use default attributes for intrinsics 2022-10-31 09:11:54 +01:00
SCCP [ValueLattice] Use DL-aware folding in getCompare() 2022-11-02 10:41:11 +01:00
SLPVectorizer [SLP] Extend reordering data of tree entry to support PHI nodes 2022-11-01 04:50:04 +00:00
SROA [SROA] Don't speculate phis with different load user types 2022-10-18 08:44:13 -07:00
SafeStack
SampleProfile [PseudoProbe] Replace relocation with offset for entry probe. 2022-10-27 13:28:22 -07:00
ScalarizeMaskedMemIntrin
Scalarizer [test][Scalarizer] Convert test cases to opaque pointers. NFC 2022-10-03 22:37:58 +02:00
SeparateConstOffsetFromGEP [AArch64] Move SeparateConstOffsetFromGEPPass before LSR and enable EnableGEPOpt by default. 2022-07-22 15:20:53 +01:00
SimpleLoopUnswitch [Test] Add test exposing crash in SimpleLoopUnswitch 2022-11-02 20:01:44 +07:00
SimplifyCFG [SimplifyCFG] Add tests for block speculation with assumes (NFC) 2022-11-03 15:46:55 +01:00
Sink [test] Use -passes in more Transforms tests 2022-10-21 17:02:02 +02:00
SpeculativeExecution
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols [StripDeadDebugInfo] Drop dead CUs 2022-09-11 01:31:03 -07:00
StructurizeCFG [BasicBlockUtils] Add a new way for CreateControlFlowHub() 2022-10-31 08:58:54 -05:00
SyntheticCountsPropagation
TailCallElim KCFI sanitizer 2022-08-24 22:41:38 +00:00
ThinLTOBitcodeWriter
TypePromotion [NFC][TypePromotion] Add test 2022-09-05 09:01:23 +01:00
UnifyFunctionExitNodes [NFC][1/n] Remove -enable-new-pm=0 flags from lit tests 2022-09-19 09:57:37 -07:00
UnifyLoopExits [BasicBlockUtils] Add a new way for CreateControlFlowHub() 2022-10-31 08:58:54 -05:00
Util [test] Use -passes in more Transforms tests 2022-10-21 17:02:02 +02:00
VectorCombine Revert "[InstCombine] Remove redundant splats in InstCombineVectorOps" 2022-11-03 07:56:03 +00:00
WholeProgramDevirt [llvm] Update WPD tests to use opaque pointers 2022-10-11 22:30:24 +00:00