1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/test/Transforms
Sanjay Patel ca34d6ec29 [InstCombine] narrow min/max intrinsics with extended inputs
We can sink extends after min/max if they match and would
not change the sign-interpreted compare. The only combo
that doesn't work is zext+smin/smax because the zexts
could change a negative number into positive:
https://alive2.llvm.org/ce/z/D6sz6J

Sext+umax/umin works:

  define i32 @src(i8 %x, i8 %y) {
  %0:
    %sx = sext i8 %x to i32
    %sy = sext i8 %y to i32
    %m = umax i32 %sx, %sy
    ret i32 %m
  }
  =>
  define i32 @tgt(i8 %x, i8 %y) {
  %0:
    %m = umax i8 %x, %y
    %r = sext i8 %m to i32
    ret i32 %r
  }
  Transformation seems to be correct!
2021-01-25 07:52:50 -05:00
..
ADCE [SimplifyCFG] Teach FoldValueComparisonIntoPredecessors() to preserve DomTree, part 1 2021-01-01 03:25:22 +03: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 [AArch64] Out-of-line atomics (-moutline-atomics) implementation. 2020-11-20 13:30:12 +00:00
Attributor [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01:00
BDCE [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
BlockExtractor
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 [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
ConstantHoisting
ConstantMerge
ConstraintElimination [ConstraintElimination] Add support for select form of and/or 2020-12-30 21:27:36 +09:00
Coroutines [InstCombine] Remove unused llvm.experimental.noalias.scope.decl 2021-01-24 13:55:50 +01: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 OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
DeadStoreElimination [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00: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 [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01:00
FunctionImport
GCOVProfiling
GlobalDCE [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
GlobalMerge
GlobalOpt Fix for Bug 48055. 2020-12-04 11:05:01 -08:00
GlobalSplit
GuardWidening
GVN [InstSimplify] Fold call null/undef to poison 2021-01-06 21:09:30 +01:00
GVNHoist [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01:00
GVNSink [SimplifyCFG] Teach HoistThenElseCodeToIf() to preserve DomTree 2020-12-30 00:48:10 +03:00
HardwareLoops [ARM] Remove LLC tests from transform/hardware loop tests. 2021-01-16 18:30:21 +00:00
HelloNew
HotColdSplit [HotColdSplit] Reflect full cost of parameters in split penalty 2020-12-18 17:06:17 -08:00
IndirectBrExpand
IndVarSimplify [LoopDeletion] Handle inner loops w/untaken backedges 2021-01-22 16:31:29 -08:00
InferAddressSpaces [NewPM] Port infer-address-spaces 2020-12-28 19:58:12 -08:00
InferFunctionAttrs [FunctionAttrs] Infer willreturn for functions without loops 2021-01-21 20:29:33 +01:00
Inline [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01:00
InstCombine [InstCombine] narrow min/max intrinsics with extended inputs 2021-01-25 07:52:50 -05:00
InstMerge OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
InstNamer
InstSimplify [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +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 [IRCE] Add test case for PR48051 2020-12-14 12:01:19 +00:00
IROutliner [IROutliner] Adapting to hoisted bitcasts in CodeExtractor 2021-01-13 11:10:37 -06:00
JumpThreading [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01:00
LCSSA [DebugInfo] Avoid re-ordering assignments in LCSSA 2020-12-17 16:17:32 +00:00
LICM [InferAttrs] Mark some library functions as willreturn. 2021-01-18 13:40:21 +00: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 [test] Fix widen-iv.ll under NPM 2020-12-07 19:34:31 -08:00
LoopFusion [test] Fix LoopFusion tests under NewPM 2020-12-07 17:37:42 -08:00
LoopIdiom [Tests] Added test for memcpy loop idiom recognization 2021-01-13 14:55:46 +01:00
LoopInstSimplify
LoopInterchange Scalar: Don't visit constants in findInnerReductionPhi in LoopInterchange 2021-01-21 12:33:06 -08:00
LoopLoadElim [LoopLoadElim] Add tests with uncomputable BTCs. 2021-01-01 13:57:02 +00: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] Add test for PR46943 (NFC) 2021-01-23 13:53:09 +01:00
LoopTransformWarning
LoopUnroll [LoopUnroll] Use llvm.experimental.noalias.scope.decl for duplicating noalias metadata as needed 2021-01-24 13:48:20 +01:00
LoopUnrollAndJam [NPM] Share pass building options with legacy PM 2020-11-23 13:04:05 -08:00
LoopUnswitch [LoopUnswitch] Fix logic to avoid unswitching with atomic loads. 2021-01-22 15:10:12 +00:00
LoopVectorize [CostModel] Tests for showing the cost of intrinsics from the vectorizer. NFC 2021-01-24 14:47:15 +00: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
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [Matrix] Propagate shape information through fneg 2021-01-22 14:34:28 -08:00
LowerSwitch
LowerTypeTests [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08:00
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
MergeFunc OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
MergeICmps [MergeICmps] Fix missing split. 2020-12-01 16:50:55 +01: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-REASSOCIATE] Simplify traversal logic by post deleting dead instructions 2020-12-04 16:17:50 +07:00
NewGVN [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
ObjCARC [ObjC][ARC] Fix a bug where the inline-asm retain/claim RV marker wasn't 2020-12-18 16:59:06 -08:00
OpenMP [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01:00
PartialInlining
PartiallyInlineLibCalls
PGOProfile [SimplifyCFG] Teach FoldValueComparisonIntoPredecessors() to preserve DomTree, part 2 2021-01-01 03:25:24 +03:00
PhaseOrdering [InstCombine] Remove unused llvm.experimental.noalias.scope.decl 2021-01-24 13:55:50 +01:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH [FuncAttrs] Infer noreturn 2021-01-05 13:25:42 -08:00
Reassociate [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
Reg2Mem
RewriteStatepointsForGC [IR] Let IRBuilder's CreateVectorSplat/CreateShuffleVector use poison as placeholder 2020-12-30 04:21:04 +09:00
SafeStack OpaquePtr: Bulk update tests to use typed byval 2020-11-20 14:00:46 -05:00
SampleProfile [SampleFDO] Add the support to split the function profiles with context into 2021-01-19 15:16:19 -08:00
ScalarizeMaskedMemIntrin
Scalarizer [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
SCCP [PredicateInfo] Handle logical and/or 2021-01-20 21:03:07 +01:00
SeparateConstOffsetFromGEP
SimpleLoopUnswitch [NewPM] Only non-trivially loop unswitch at -O3 and for non-optsize functions 2021-01-13 14:54:49 -08:00
SimplifyCFG [SimplifyCFG] Regenerate test checks (NFC) 2021-01-23 21:24:54 +01:00
Sink
SLPVectorizer [SLP] fix fast-math requirements for fmin/fmax reductions 2021-01-24 08:55:56 -05:00
SpeculateAroundPHIs
SpeculativeExecution Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
SROA Use unary CreateShuffleVector if possible 2020-12-30 22:36:08 +09:00
StraightLineStrengthReduce [NPM] Add remaining test of -slsr 2020-11-17 14:41:01 +08:00
StripDeadPrototypes
StripSymbols
StructurizeCFG [test] Pin backedge-id-bug-xfail.ll to legacy PM 2021-01-04 13:09:42 -08:00
SyntheticCountsPropagation
TailCallElim OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
ThinLTOBitcodeWriter [NewPM][opt] Run the "default" AA pipeline by default 2021-01-21 21:08:54 -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 [PredicateInfo] Handle logical and/or 2021-01-20 21:03:07 +01:00
VectorCombine [Constant] Update ConstantVector::get to return poison if all input elems are poison 2021-01-07 09:26:07 +09:00
WholeProgramDevirt