llvm-project/llvm/test/Transforms
Roman Lebedev 156f10c840
[IR] `SCEVExpander::generateOverflowCheck()`: short-circuit `umul_with_overflow`-by-one
It's a no-op, no overflow happens ever: https://alive2.llvm.org/ce/z/Zw89rZ

While generally i don't like such hacks,
we have a very good reason to do this: here we are expanding
a run-time correctness check for the vectorization,
and said `umul_with_overflow` will not be optimized out
before we query the cost of the checks we've generated.

Which means, the cost of run-time checks would be artificially inflated,
and after https://reviews.llvm.org/D109368 that will affect
the minimal trip count for which these checks are even evaluated.
And if they aren't even evaluated, then the vectorized code
certainly won't be run.

We could consider doing this in IRBuilder,  but then we'd need to
also teach `CreateExtractValue()` to look into chain of `insertvalue`'s,
and i'm not sure there's precedent for that.

Refs. https://reviews.llvm.org/D109368#3089809
2021-10-27 19:45:55 +03:00
..
ADCE [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00
AddDiscriminators [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00
AggressiveInstCombine [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00
AlignmentFromAssumptions [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00
ArgumentPromotion [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00
AtomicExpand
Attributor [Attributor] Generalize GEP construction 2021-10-22 18:30:43 +02:00
BDCE [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00
BlockExtractor
BranchFolding
CallSiteSplitting
CalledValuePropagation [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00
CanonicalizeAliases
CanonicalizeFreezeInLoops [AArch64] Make -mcpu=generic schedule for an in-order core 2021-10-09 15:58:31 +01:00
CodeExtractor [CodeExtractor] Preserve topological order for the return blocks. 2021-08-25 08:09:01 -07:00
CodeGenPrepare [CodeGenPrepare] Avoid a scalable-vector crash in ctlz/cttz 2021-10-20 16:45:55 +01:00
ConstantHoisting [RISCV] Add zext.h/zext.w to RISCVTTIImpl::getIntImmCostInst. 2021-08-18 09:40:40 -07:00
ConstantMerge
ConstraintElimination [ConstraintElimination] Rewrite tests to reduce verification complexity. 2021-08-26 16:41:40 +01:00
Coroutines [Coroutines] Ignore partial lifetime markers refer of an alloca 2021-10-22 09:49:50 +08:00
CorrelatedValuePropagation Revert "Recommit "Revert "[CVP] processSwitch: Remove default case when switch cover all possible values.""" 2021-09-27 20:39:05 +08:00
CrossDSOCFI
DCE [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00
DFAJumpThreading Add jump-threading optimization for deterministic finite automata 2021-07-27 14:34:04 -04:00
DeadArgElim [ObjC][ARC] Use the addresses of the ARC runtime functions instead of 2021-09-08 11:58:03 -07:00
DeadStoreElimination [DSE] Add test case with 2 memcpys that should not be eliminated. 2021-10-27 11:15:58 +01:00
DivRemPairs [DivRemPairs] make sure we have a valid CFG for hoisting division 2021-07-28 11:09:12 -04:00
EarlyCSE [NewPM] Use parameterized syntax for a couple of more passes 2021-08-20 14:59:21 +02:00
EliminateAvailableExternally
EntryExitInstrumenter [NewPM] Use parameterized syntax for a couple of more passes 2021-08-20 14:59:21 +02:00
ExpandMemCmp [x86] split memcmp tests for 32/64-bit targets; NFC 2021-08-15 13:51:18 -04:00
FixIrreducible
Float2Int [NewPM][test] Strickly use -passes in some more lit tests 2021-10-20 17:06:47 +02:00
ForcedFunctionAttrs
FunctionAttrs [NewPM][test] Avoid using -enable-new-pm=1 since -passes implies new PM 2021-10-20 15:16:17 +02:00
FunctionImport
FunctionSpecialization [FuncSpec] Don't run the solver if there's nothing to do 2021-10-13 19:05:19 +01:00
GCOVProfiling [GCov] Emit memset instead of stores in __llvm_gcov_reset 2021-08-05 22:40:15 -07:00
GVN Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
GVNHoist PR46874: Reset stack after visiting a node 2021-08-20 11:25:05 -07:00
GVNSink
GlobalDCE [GlobalDCE] In VFE, replace the whole 'sub' expression of unused relative-pointer-based vtable slots 2021-10-06 15:55:55 -07:00
GlobalMerge
GlobalOpt [opt] Directly translate -O# to -passes='default<O#>' 2021-10-18 16:48:10 -07:00
GlobalSplit
GuardWidening [test] Remove -loop-guard-widening legacy PM tests 2021-09-05 11:36:21 -07:00
HardwareLoops [HardwareLoops] Loop guard intrinsic to recognise zext 2021-09-16 08:33:16 +01:00
HelloNew
HotColdSplit [CodeExtractor] Preserve topological order for the return blocks. 2021-08-25 08:09:01 -07:00
IRCE
IROutliner [IROutliner] Adding supports for multiple exits 2021-09-08 08:58:07 -07:00
IndVarSimplify [indvars] Fix pr52276 (missing one use check) 2021-10-25 09:26:55 -07:00
IndirectBrExpand
InferAddressSpaces [Tests] Fix incorrect noalias metadata 2021-09-18 20:51:00 +02:00
InferFunctionAttrs Replace "CHECK-NOT: #{{.*}}" with same-line positive checks. NFC. 2021-08-05 21:55:23 -07:00
Inline [test] Make test added in D112473 check the IR 2021-10-25 14:10:58 -07:00
InstCombine [AArch64][SVE] Combine predicated FMUL/FADD into FMA 2021-10-27 11:41:23 +00:00
InstMerge
InstNamer
InstSimplify [FPEnv][InstSimplify] Fold fadd X, 0 ==> X, when we know X is not -0 2021-10-14 12:32:45 -04:00
InterleavedAccess
Internalize
JumpThreading [test] autogen a couple of additional tests 2021-10-05 18:58:08 -07:00
LCSSA
LICM [NewPM][test] Avoid using -enable-new-pm=1 since -passes implies new PM 2021-10-20 15:16:17 +02:00
LoadStoreVectorizer [LSV] Change the default value of InstertElement to poison 2021-10-03 17:57:34 +09:00
LoopBoundSplit [LoopBoundSplit] Handle the case in which exiting block is loop header 2021-10-08 09:13:41 +01:00
LoopDataPrefetch [LoopDataPrefetch] Add missed LoopSimplify dependence for prefetch pass 2021-08-26 21:01:59 +08:00
LoopDeletion [LoopDeletion] Support selects when symbolically evaluating 1st iteration 2021-10-09 14:47:44 +07:00
LoopDistribute [IR] `IRBuilderBase::CreateOr()`: fix short-circuiting for constant on LHS 2021-10-27 18:01:06 +03:00
LoopFlatten [LoopFlatten] Bail if we can't perform flattening after IV widening 2021-09-29 19:53:34 +01:00
LoopFusion
LoopIdiom [IR] `IRBuilderBase::CreateAnd()`: fix short-circuiting for constant on LHS 2021-10-27 18:01:06 +03:00
LoopInstSimplify
LoopInterchange
LoopLoadElim
LoopPredication [IR] `IRBuilderBase::CreateAnd()`: short-circuit `x & 0` --> `0` 2021-10-27 18:01:06 +03:00
LoopReroll
LoopRotate [LoopRotate] Forget SCEV values in RewriteUsesOfClonedInstructions 2021-10-07 19:36:30 +02:00
LoopSimplify [test] Fixup tests with -analyze in llvm/test/Transforms 2021-09-04 16:45:51 -07:00
LoopSimplifyCFG [Tests] Remove explicit -enable-mssa-loop-dependency options (NFC) 2021-08-14 21:21:07 +02:00
LoopStrengthReduce [ARM] Simplify address calculation for NEON load/store 2021-10-14 15:23:10 +03:00
LoopTransformWarning
LoopUnroll [LoopPeel] Peel if it turns invariant loads dereferenceable. 2021-10-12 11:42:28 +01:00
LoopUnrollAndJam
LoopUnswitch [NewPM][test] Avoid using -enable-new-pm=1 since -passes implies new PM 2021-10-20 15:16:17 +02:00
LoopVectorize [IR] `SCEVExpander::generateOverflowCheck()`: short-circuit `umul_with_overflow`-by-one 2021-10-27 19:45:55 +03:00
LoopVersioning [IR] `IRBuilderBase::CreateOr()`: fix short-circuiting for constant on LHS 2021-10-27 18:01:06 +03:00
LoopVersioningLICM [opt] Directly translate -O# to -passes='default<O#>' 2021-10-18 16:48:10 -07:00
LowerAtomic
LowerConstantIntrinsics [LowerConstantIntrinsics] Fix heap-use-after-free bug in worklist 2021-09-21 11:33:07 +02:00
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [Tests] Fix incorrect noalias metadata 2021-09-18 20:51:00 +02:00
LowerSwitch
LowerTypeTests [IR] `IRBuilderBase::CreateAnd()`: fix short-circuiting for constant on LHS 2021-10-27 18:01:06 +03:00
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg [NewPM][test] Use -passes syntax in Mem2Reg lit tests 2021-10-20 17:06:47 +02:00
MemCpyOpt [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
MergeFunc [opt] Directly translate -O# to -passes='default<O#>' 2021-10-18 16:48:10 -07:00
MergeICmps [MergeICmps] Don't reorder unmerged comparisons 2021-09-21 21:22:12 +02:00
MetaRenamer [NewPM][test] Strickly use -passes in some more lit tests 2021-10-20 17:06:47 +02:00
NameAnonGlobals
NaryReassociate [NARY-REASSOCIATE] Fix infinite recursion optimizing min\max 2021-10-20 14:23:03 +07:00
NewGVN [MemorySSA] Support invariant.group metadata 2021-09-08 13:06:12 -07:00
ObjCARC [ObjC][ARC] Use the addresses of the ARC runtime functions instead of 2021-09-08 11:58:03 -07:00
OpenMP Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
PGOProfile [InstrProfiling] Keep profd non-private for non-renamable comdat functions 2021-08-24 20:14:03 -07:00
PartialInlining
PartiallyInlineLibCalls
PhaseOrdering [SLP]Do not reorder reduction nodes. 2021-10-26 07:41:24 -07:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate
Reg2Mem [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00
RelLookupTableConverter/X86
RewriteStatepointsForGC [LLVM] Inclusive terms: remove/replace references to sanity in RewriteStatepointsForGC.cpp and test 2021-10-25 16:17:41 -04:00
SCCP [SCCP] Properly report changes when changing a pointer argument 2021-10-11 13:12:08 -07:00
SLPVectorizer [SLP]Improve/fix reordering of the gathered graph nodes. 2021-10-27 08:49:13 -07:00
SROA [IR] Add helper to convert offset to GEP indices 2021-09-20 20:18:16 +02:00
SafeStack
SampleProfile [NewPM][test] Avoid using -enable-new-pm=1 since -passes implies new PM 2021-10-20 15:16:17 +02:00
ScalarizeMaskedMemIntrin
Scalarizer [NewPM][test] Only use -passes syntax in Scalarizer lit tests 2021-10-20 15:16:18 +02:00
SeparateConstOffsetFromGEP SeparateConstOffsetFromGEP: Fix stack overflow in unreachable code 2021-09-14 19:49:38 -04:00
SimpleLoopUnswitch [SimpleLoopUnswitch] Re-fix introduction of UB when hoisted condition may be undef or poison 2021-10-12 01:02:09 +09:00
SimplifyCFG [Test] Add test for PR52290 2021-10-25 18:25:59 +07:00
Sink
SpeculativeExecution [NewPM][test] Use -passes syntax in SpeculativeExecution lit tests 2021-10-20 15:16:17 +02:00
StraightLineStrengthReduce
StripDeadPrototypes [NewPM][test] Strickly use -passes in some more lit tests 2021-10-20 17:06:47 +02:00
StripSymbols [NewPM][test] Strickly use -passes in some more lit tests 2021-10-20 17:06:47 +02:00
StructurizeCFG
SyntheticCountsPropagation
TailCallElim [ObjC][ARC] Use the addresses of the ARC runtime functions instead of 2021-09-08 11:58:03 -07:00
ThinLTOBitcodeWriter ThinLTO: Fix inline assembly references to static functions with CFI 2021-08-03 11:35:30 -07:00
TypePromotion/ARM [ARM][TypePromotion] Re-generate test checks. NFC 2021-08-16 13:42:42 -07:00
UnifyFunctionExitNodes
UnifyLoopExits
Util Improve the effectiveness of BDCE's debug info salvaging 2021-09-30 09:28:49 -07:00
VectorCombine [VectorCombine] fold shuffle-of-binops with common operand 2021-10-21 12:37:54 -04:00
WholeProgramDevirt [test] Update some test cases to use -passes when specifying the pipeline 2021-09-29 21:51:08 +02:00